diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-09-23 11:26:17 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-23 11:26:17 -0700 |
commit | 77bd616367905437fe6181611e0c65fe23160ea1 (patch) | |
tree | b9d43ef6f513b3c1aaaf0028678717241f1aaba2 /builtin | |
parent | Merge branch 'ab/retire-option-argument' into da/difftool (diff) | |
parent | difftool: fix symlink-file writing in dir-diff mode (diff) | |
download | tgif-77bd616367905437fe6181611e0c65fe23160ea1.tar.xz |
Merge branch 'da/difftool-dir-diff-symlink-fix' into da/difftool
* da/difftool-dir-diff-symlink-fix:
difftool: fix symlink-file writing in dir-diff mode
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/difftool.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/difftool.c b/builtin/difftool.c index bb9fe7245a..21e055d13a 100644 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@ -557,11 +557,13 @@ static int run_dir_diff(const char *extcmd, int symlinks, const char *prefix, if (*entry->left) { add_path(&ldir, ldir_len, entry->path); ensure_leading_directories(ldir.buf); + unlink(ldir.buf); write_file(ldir.buf, "%s", entry->left); } if (*entry->right) { add_path(&rdir, rdir_len, entry->path); ensure_leading_directories(rdir.buf); + unlink(rdir.buf); write_file(rdir.buf, "%s", entry->right); } } |