anchor.diff:      });
     }
   
  +  static FileStatus createForDirectory(chrome.Entry entry) {
  +    FileStatus status = new FileStatus();
  +    status.path = entry.fullPath;
  +    return status;
  +  }
  +
     FileStatus.fromMap(Map m) {
       path = m['path'];
       headSha = m['headSha'];
  
positive.code:    * Walks over all the files in the working tree. Returns sha of the
     * working tree.
     */
     Future<List<String>> walkFilesAndUpdateIndex(chrome.DirectoryEntry root,
         bool updateSha) {
       List<String> filePaths = [];
       return FileOps.listFiles(root).then((List<chrome.ChromeFileEntry> entries) {
         if (entries.isEmpty) {
           return filePaths;
         }
  
         return Future.forEach(entries, (chrome.Entry entry) {
           if (entry.name == '.git') {
             return filePaths;
           }
  
           if (entry.isDirectory) {
             return walkFilesAndUpdateIndex(entry, updateSha).then(
                 (List<String> paths) {
               filePaths.addAll(paths);
               return filePaths;
             });
           } else {
             // don't update index for untracked files.
             if (_statusIdx[entry.fullPath] != null) {
               filePaths.add(entry.fullPath);
               if (updateSha) {
                 return getShaForEntry(entry, 'blob').then((String sha) {
                   return entry.getMetadata().then((data) {
  
negative.code:              }
             }
           }
         }).then((_) {
           if (fileStatuses.isEmpty) {
             deleteIndexForEntry(root.fullPath);
           } else if (fileStatuses.any((status) => status.type
               != FileStatusType.COMMITTED)) {
             FileStatus status = FileStatus.createForDirectory(root);
             status.type = FileStatusType.MODIFIED;
             _statusIdx[root.fullPath] = status;
             fileStatuses.add(status);
           } else {
             FileStatus status = FileStatus.createForDirectory(root);
             status.type = FileStatusType.COMMITTED;
             status.path = root.fullPath;
             _statusIdx[root.fullPath] = status;
             fileStatuses.add(status);
           }
           return fileStatuses;
         });
       });
     }
  
    /**
     * Update the index saving the information for deleted files. If the files
     * are added back, they will be restored back and not treated as untracked.
     */
    void _updateDeletedFiles(List<FileStatus> statuses) {
      List<String> filePaths = statuses.map((status) => status.path).toList();
      _statusIdx.forEach((String filePath, FileStatus status) {
        if (!filePaths.contains(filePath)) {
          status.deleted = true;
  