anchor.diff:               return new Future.value();
              });
            } else {
  -           return getShaForEntry(entry, 'blob').then((String sha) {
  -             return entry.getMetadata().then((data) {
  -               FileStatus status = new FileStatus();
  -               status.path = entry.fullPath;
  -               status.sha = sha;
  -               status.size = data.size;
  -               updateIndexForEntry(status);
  -               filePaths.add(entry.fullPath);
  +           // don't update index for untracked files.
  +           if (_statusIdx[entry.fullPath] != null) {
  +             return getShaForEntry(entry, 'blob').then((String sha) {
  +               return entry.getMetadata().then((data) {
  +                 FileStatus status = new FileStatus();
  +                 status.path = entry.fullPath;
  +                 status.sha = sha;
  +                 status.size = data.size;
  +                 updateIndexForEntry(status);
  +                 filePaths.add(entry.fullPath);
  +               });
                });
  -           });
  +           }
            }
         }).then((_) {
           _updateDeletedFiles(filePaths);
  
positive.code:       } else {
          status.type = oldStatus.type;
        }
      } else {
        status.headSha = status.sha;
        status.type = FileStatusType.UNTRACKED;
      }
      _statusIdx[status.path] = status;
      _scheduleWriteIndex();
  
negative.code:             }
              break;
            case FileStatusType.UNTRACKED:
              if (status.type != FileStatusType.MODIFIED) {
                status.type = FileStatusType.UNTRACKED;
              }
              break;
            default:
              throw "Unsupported file status type.";
  