author | Elijah Newren <newren@gmail.com> | |
Fri, 9 Jul 2010 13:10:53 +0000 (07:10 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 9 Jul 2010 23:12:42 +0000 (16:12 -0700) | ||
commit | 37348937ff391f01981e8af10b2f615268fd2509 | |
tree | cf7f9b6eeb2d8057a483e31255ab0497e5c5bb4d | tree | snapshot |
parent | f433f70547ebf038a862ca72565ae42e50d4adfa | commit | diff |
merge-recursive: Fix D/F conflicts
The D/F conflicts that can be automatically resolved (file or directory
unmodified on one side of history), have the nice property that
process_entry() can correctly handle all subpaths of the D/F conflict. In
the case of D->F conversions, it will correctly delete all non-conflicting
files below the relevant directory and the directory itself (note that both
untracked and conflicting files below the directory will prevent its
removal). So if we handle D/F conflicts after all other conflicts, they
become fairly simple to handle -- we just need to check for whether or not
a path (file/directory) is in the way of creating the new content. We do
this by having process_entry() defer handling such entries to a subsequent
process_df_entry() step.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The D/F conflicts that can be automatically resolved (file or directory
unmodified on one side of history), have the nice property that
process_entry() can correctly handle all subpaths of the D/F conflict. In
the case of D->F conversions, it will correctly delete all non-conflicting
files below the relevant directory and the directory itself (note that both
untracked and conflicting files below the directory will prevent its
removal). So if we handle D/F conflicts after all other conflicts, they
become fairly simple to handle -- we just need to check for whether or not
a path (file/directory) is in the way of creating the new content. We do
this by having process_entry() defer handling such entries to a subsequent
process_df_entry() step.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c | diff | blob | history | |
t/t6035-merge-dir-to-symlink.sh | diff | blob | history |