aboutsummaryrefslogtreecommitdiff
path: root/builtin-rerere.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-25 01:29:43 -0800
committerJunio C Hamano <junkio@cox.net>2007-02-25 01:29:43 -0800
commit128917274943bd0e2dea69862c5a9893a962e350 (patch)
tree44d8876e23e9241aef9e961eb308eda005229c3e /builtin-rerere.c
parentab242f809a9e06ebf935c0512155fc5661ab84ab (diff)
downloadgit-128917274943bd0e2dea69862c5a9893a962e350.tar.gz
git-128917274943bd0e2dea69862c5a9893a962e350.tar.xz
rerere: do not deal with symlinks.
Who would use multi-line symlinks that would benefit from rerere? Just ignore them. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-rerere.c')
-rw-r--r--builtin-rerere.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/builtin-rerere.c b/builtin-rerere.c
index ac0bf335a..58c5fed91 100644
--- a/builtin-rerere.c
+++ b/builtin-rerere.c
@@ -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;
}