Skip to content

Commit

Permalink
rerere: do not deal with symlinks.
Browse files Browse the repository at this point in the history
Who would use multi-line symlinks that would benefit from rerere?
Just ignore them.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Feb 25, 2007
1 parent ab242f8 commit 1289172
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions builtin-rerere.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,15 @@ static int find_conflict(struct path_list *conflict)
return error("Could not read index");
for (i = 0; i + 2 < active_nr; i++) {
struct cache_entry *e1 = active_cache[i];
struct cache_entry *e2 = active_cache[i + 1];
struct cache_entry *e3 = active_cache[i + 2];
if (ce_stage(e1) == 1 && ce_stage(e2) == 2 &&
ce_stage(e3) == 3 && ce_same_name(e1, e2) &&
ce_same_name(e1, e3)) {
struct cache_entry *e2 = active_cache[i+1];
struct cache_entry *e3 = active_cache[i+2];
if (ce_stage(e1) == 1 &&
ce_stage(e2) == 2 &&
ce_stage(e3) == 3 &&
ce_same_name(e1, e2) && ce_same_name(e1, e3) &&
S_ISREG(ntohl(e1->ce_mode)) &&
S_ISREG(ntohl(e2->ce_mode)) &&
S_ISREG(ntohl(e3->ce_mode))) {
path_list_insert((const char *)e1->name, conflict);
i += 2;
}
Expand Down

0 comments on commit 1289172

Please sign in to comment.