From: Junio C Hamano Date: Thu, 28 Mar 2013 21:37:22 +0000 (-0700) Subject: Merge branch 'jk/difftool-dir-diff-edit-fix' X-Git-Tag: v1.8.3-rc0~160 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18973d8ac9e396d0eefdf36d7c6aa43aa7d396a6;p=git Merge branch 'jk/difftool-dir-diff-edit-fix' "git difftool --dir-diff" made symlinks to working tree files when preparing a temporary directory structure, so that accidental edits of these files in the difftool are reflected back to the working tree, but the logic to decide when to do so was not quite right. * jk/difftool-dir-diff-edit-fix: difftool --dir-diff: symlink all files matching the working tree difftool: avoid double slashes in symlink targets git-difftool(1): fix formatting of --symlink description --- 18973d8ac9e396d0eefdf36d7c6aa43aa7d396a6 diff --cc t/t7800-difftool.sh index 3aab6e1500,db3d3d6bd1..c6d6b1c99f --- a/t/t7800-difftool.sh +++ b/t/t7800-difftool.sh @@@ -335,15 -365,37 +335,37 @@@ test_expect_success PERL 'difftool -d' ' test_expect_success PERL 'difftool --dir-diff' ' - diff=$(git difftool --dir-diff --extcmd ls branch) && - echo "$diff" | stdin_contains sub && - echo "$diff" | stdin_contains file + git difftool --dir-diff --extcmd ls branch >output && + stdin_contains sub actual + EOF + + test_expect_success PERL,SYMLINKS 'difftool --dir-diff --symlink without unstaged changes' ' + cat >expect <<-EOF && + file + $(pwd)/file + file2 + $(pwd)/file2 + sub/sub + $(pwd)/sub/sub + EOF + git difftool --dir-diff --symlink \ + --extcmd "./.git/CHECK_SYMLINKS" branch HEAD && + test_cmp actual expect + ' + test_expect_success PERL 'difftool --dir-diff ignores --prompt' ' - diff=$(git difftool --dir-diff --prompt --extcmd ls branch) && - echo "$diff" | stdin_contains sub && - echo "$diff" | stdin_contains file + git difftool --dir-diff --prompt --extcmd ls branch >output && + stdin_contains sub