Evil Merge branch 'jc/status' (early part) into js/diff-ni

* 'jc/status' (early part):
  run_diff_{files,index}(): update calling convention.
  update-index: do not die too early in a read-only repository.
  git-status: do not be totally useless in a read-only repository.

This is to resolve semantic conflict (which is not textual) that
changes the calling convention of run_diff_files() early.
This commit is contained in:
Junio C Hamano
2007-02-24 02:20:13 -08:00
6 changed files with 44 additions and 22 deletions

View File

@ -217,6 +217,10 @@ int run_diff_files_cmd(struct rev_info *revs, int argc, const char **argv)
return 0;
}
if (read_cache() < 0) {
perror("read_cache");
return -1;
}
return run_diff_files(revs, silent_on_removed);
}
@ -227,11 +231,7 @@ int run_diff_files(struct rev_info *revs, int silent_on_removed)
if (diff_unmerged_stage < 0)
diff_unmerged_stage = 2;
entries = read_cache();
if (entries < 0) {
perror("read_cache");
return -1;
}
entries = active_nr;
for (i = 0; i < entries; i++) {
struct stat st;
unsigned int oldmode, newmode;
@ -559,10 +559,6 @@ int run_diff_index(struct rev_info *revs, int cached)
if (!revs->ignore_merges)
match_missing = 1;
if (read_cache() < 0) {
perror("read_cache");
return -1;
}
mark_merge_entries();
ent = revs->pending.objects[0].item;