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>
Junio C Hamano committed
Feb 25, 2007 at 01:29 UTC
128917274943bd0e2dea69862c5a9893a962e350
1 file changed
+9
-5
builtin-rerere.c
+9
-5
@@ -154,11 +154,15 @@ static int find_conflict(struct path_list *conflict)
154
return error("Could not read index");
155
for (i = 0; i + 2 < active_nr; i++) {
156
struct cache_entry *e1 = active_cache[i];
157
- struct cache_entry *e2 = active_cache[i + 1];
158
- struct cache_entry *e3 = active_cache[i + 2];
159
- if (ce_stage(e1) == 1 && ce_stage(e2) == 2 &&
160
- ce_stage(e3) == 3 && ce_same_name(e1, e2) &&
161
- ce_same_name(e1, e3)) {
157
+ struct cache_entry *e2 = active_cache[i+1];
158
+ struct cache_entry *e3 = active_cache[i+2];
159
+ if (ce_stage(e1) == 1 &&
160
+ ce_stage(e2) == 2 &&
161
+ ce_stage(e3) == 3 &&
162
+ ce_same_name(e1, e2) && ce_same_name(e1, e3) &&
163
+ S_ISREG(ntohl(e1->ce_mode)) &&
164
+ S_ISREG(ntohl(e2->ce_mode)) &&
165
+ S_ISREG(ntohl(e3->ce_mode))) {
166
path_list_insert((const char *)e1->name, conflict);
167
i += 2;
168
}