Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-05-19 15:59:15 +0300
committerJunio C Hamano <gitster@pobox.com>2017-05-24 04:59:27 +0300
commit158b06caee5f9ea2987f444b8e49bd2d678b187d (patch)
treec7038b47c4392461e760b97f0d4ef0d9a766f073 /t/t4063-diff-blobs.sh
parentd04ec74b17138733463c0ca1024fdbb42be6096a (diff)
diff: use pending "path" if it is available
There's a subtle distinction between "name" and "path" for a blob that we resolve: the name is what the user told us on the command line, and the path is what we traversed when finding the blob within a tree (if we did so). When we diff blobs directly, we use "name", but "path" is more likely to be useful to the user (it will find the correct .gitattributes, and give them a saner diff header). We still have to fall back to using the name for some cases (i.e., any blob reference that isn't of the form tree:path). That's the best we can do in such a case. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4063-diff-blobs.sh')
-rwxr-xr-xt/t4063-diff-blobs.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t4063-diff-blobs.sh b/t/t4063-diff-blobs.sh
index df9c35b2dd..80ce033ab6 100755
--- a/t/t4063-diff-blobs.sh
+++ b/t/t4063-diff-blobs.sh
@@ -55,7 +55,7 @@ test_expect_success 'diff by tree:path (run)' '
test_expect_success 'index of tree:path diff' '
check_index $sha1_one $sha1_two
'
-test_expect_failure 'tree:path diff uses filenames as paths' '
+test_expect_success 'tree:path diff uses filenames as paths' '
check_paths one two
'
test_expect_success 'tree:path diff shows mode change' '
@@ -68,7 +68,7 @@ test_expect_success 'diff by ranged tree:path' '
test_expect_success 'index of ranged tree:path diff' '
check_index $sha1_one $sha1_two
'
-test_expect_failure 'ranged tree:path diff uses filenames as paths' '
+test_expect_success 'ranged tree:path diff uses filenames as paths' '
check_paths one two
'
test_expect_success 'ranged tree:path diff shows mode change' '