anchor.diff:      _scheduleWriteIndex();
     }
   
  +  /**
  +   * Updates the git index. Status of deleted files are removed.
  +   * Status of untracked files are left as untracked.
  +   */
  +  void onCommit() {
  +    Map<String, FileStatus> statusIdx = {};
  +    _statusIdx.forEach((key, FileStatus status) {
  +      if (status.type != FileStatusType.UNTRACKED) {
  +        status.headSha = status.sha;
  +        status.type = FileStatusType.COMMITTED;
  +      }
  +      if (!status.isDeleted) {
  +        statusIdx[key] = status;
  +      }
  +    });
  +    _statusIdx = statusIdx;
  +    _scheduleWriteIndex();
  +  }
  +
     void commitEntry(FileStatus status) {
       status.headSha = status.sha;
       status.type = FileStatusType.COMMITTED;
  
positive.code:                status.sha = sha;
                 status.size = data.size;
                 updateIndexForEntry(status);
               });
             });
           }
        }).then((_) {
          return new Future.value();
        });
      });
    }
  
  
negative.code:    * working tree.
     */
     Future<String> walkFilesAndUpdateIndex(chrome.DirectoryEntry root) {
       List<String> filePaths = [];
       return FileOps.listFiles(root).then((List<chrome.ChromeFileEntry> entries) {
         if (entries.isEmpty) {
           return new Future.value();
  