diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-08-31 16:23:58 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-31 16:23:58 -0700 |
commit | 3f29dd6c2344c56aad263a82a773ead0d9fded30 (patch) | |
tree | 3c9747da395c4e478f84e8118f28f78e9e8c8ee0 /fast-import.c | |
parent | aca35505db3706c87d391dd213e856f73edfd42c (diff) | |
parent | 96ecac677aa84639a0b8e0aa0d781b197a2d16fe (diff) | |
download | git-3f29dd6c2344c56aad263a82a773ead0d9fded30.tar.gz |
Merge branch 'en/d-f-conflict-fix'
* en/d-f-conflict-fix:
merge-recursive: Avoid excessive output for and reprocessing of renames
merge-recursive: Fix multiple file rename across D/F conflict
t6031: Add a testcase covering multiple renames across a D/F conflict
merge-recursive: Fix typo
Mark tests that use symlinks as needing SYMLINKS prerequisite
t/t6035-merge-dir-to-symlink.sh: Remove TODO on passing test
fast-import: Improve robustness when D->F changes provided in wrong order
fast-export: Fix output order of D/F changes
merge_recursive: Fix renames across paths below D/F conflicts
merge-recursive: Fix D/F conflicts
Add a rename + D/F conflict testcase
Add additional testcases for D/F conflicts
Conflicts:
merge-recursive.c
Diffstat (limited to 'fast-import.c')
-rw-r--r-- | fast-import.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fast-import.c b/fast-import.c index dd51ac48b6..2317b0fe75 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1528,6 +1528,14 @@ static int tree_content_remove( for (i = 0; i < t->entry_count; i++) { e = t->entries[i]; if (e->name->str_len == n && !strncmp(p, e->name->str_dat, n)) { + if (slash1 && !S_ISDIR(e->versions[1].mode)) + /* + * If p names a file in some subdirectory, and a + * file or symlink matching the name of the + * parent directory of p exists, then p cannot + * exist and need not be deleted. + */ + return 1; if (!slash1 || !S_ISDIR(e->versions[1].mode)) goto del_entry; if (!e->tree) |