aboutsummaryrefslogtreecommitdiffstats
path: root/t/annotate-tests.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-04-25 16:41:21 +0900
committerJunio C Hamano <gitster@pobox.com>2019-04-25 16:41:21 +0900
commitd8620d3ca7a01c1108f3145cc77dbda6e0e970c6 (patch)
tree26c7106af5727b8b0740eea664da5cedcebbb6e5 /t/annotate-tests.sh
parentMerge branch 'tg/ls-files-debug-format-fix' (diff)
parentblame: default to HEAD in a bare repo when no start commit is given (diff)
downloadgit-d8620d3ca7a01c1108f3145cc77dbda6e0e970c6.tar.gz
git-d8620d3ca7a01c1108f3145cc77dbda6e0e970c6.zip
Merge branch 'sg/blame-in-bare-start-at-head'
"git blame -- path" in a non-bare repository starts blaming from the working tree, and the same command in a bare repository errors out because there is no working tree by definition. The command has been taught to instead start blaming from the commit at HEAD, which is more useful. * sg/blame-in-bare-start-at-head: blame: default to HEAD in a bare repo when no start commit is given
Diffstat (limited to 't/annotate-tests.sh')
-rw-r--r--t/annotate-tests.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
index 6da48a2e0a..d933af5714 100644
--- a/t/annotate-tests.sh
+++ b/t/annotate-tests.sh
@@ -68,6 +68,14 @@ test_expect_success 'blame 1 author' '
check_count A 2
'
+test_expect_success 'blame in a bare repo without starting commit' '
+ git clone --bare . bare.git &&
+ (
+ cd bare.git &&
+ check_count A 2
+ )
+'
+
test_expect_success 'blame by tag objects' '
git tag -m "test tag" testTag &&
git tag -m "test tag #2" testTag2 testTag &&