summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-12-27 14:58:13 -0800
committerJunio C Hamano <gitster@pobox.com>2013-12-27 14:58:13 -0800
commit6904f9aa5ba7666cdb5390733225e123fe25526b (patch)
tree7867aa393189903c8075c16abc35163f6de07243 /t
parent604ada435b78a473baa6962a90def78ccb186c58 (diff)
parent0ea7d5b6f8e258fdec067edf1b136ed87c5670e5 (diff)
downloadgit-6904f9aa5ba7666cdb5390733225e123fe25526b.tar.gz
Merge branch 'zk/difftool-counts'
Show the total number of paths and the number of paths shown so far when "git difftool" prompts to launch an external diff tool, which would give users some sense of progress. * zk/difftool-counts: diff.c: fix some recent whitespace style violations difftool: display the number of files in the diff queue in the prompt
Diffstat (limited to 't')
-rwxr-xr-xt/t4020-diff-external.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t4020-diff-external.sh b/t/t4020-diff-external.sh
index 8a309795c9..bcae35ac1c 100755
--- a/t/t4020-diff-external.sh
+++ b/t/t4020-diff-external.sh
@@ -193,6 +193,19 @@ test_expect_success 'GIT_EXTERNAL_DIFF with more than one changed files' '
GIT_EXTERNAL_DIFF=echo git diff
'
+test_expect_success 'GIT_EXTERNAL_DIFF path counter/total' '
+ write_script external-diff.sh <<-\EOF &&
+ echo $GIT_DIFF_PATH_COUNTER of $GIT_DIFF_PATH_TOTAL >>counter.txt
+ EOF
+ >counter.txt &&
+ cat >expect <<-\EOF &&
+ 1 of 2
+ 2 of 2
+ EOF
+ GIT_EXTERNAL_DIFF=./external-diff.sh git diff &&
+ test_cmp expect counter.txt
+'
+
test_expect_success 'GIT_EXTERNAL_DIFF generates pretty paths' '
touch file.ext &&
git add file.ext &&