summaryrefslogtreecommitdiff
path: root/t/t0100-previous.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-03-14 15:23:18 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-03-14 15:23:18 -0700
commitc809496c97122b7d297e7216c3bfff7262b212e0 (patch)
tree7fc616a9cc1233b41e63ef259d6792e0e074f5f4 /t/t0100-previous.sh
parentMerge branch 'ab/cond-skip-tests' (diff)
parentcheckout: restrict @-expansions when finding branch (diff)
downloadtgif-c809496c97122b7d297e7216c3bfff7262b212e0.tar.xz
Merge branch 'jk/interpret-branch-name'
"git branch @" created refs/heads/@ as a branch, and in general the code that handled @{-1} and @{upstream} was a bit too loose in disambiguating. * jk/interpret-branch-name: checkout: restrict @-expansions when finding branch strbuf_check_ref_format(): expand only local branches branch: restrict @-expansions when deleting t3204: test git-branch @-expansion corner cases interpret_branch_name: allow callers to restrict expansions strbuf_branchname: add docstring strbuf_branchname: drop return value interpret_branch_name: move docstring to header file interpret_branch_name(): handle auto-namelen for @{-1}
Diffstat (limited to 't/t0100-previous.sh')
-rwxr-xr-xt/t0100-previous.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t0100-previous.sh b/t/t0100-previous.sh
index e0a6940232..58c0b7e9b6 100755
--- a/t/t0100-previous.sh
+++ b/t/t0100-previous.sh
@@ -56,5 +56,13 @@ test_expect_success 'merge @{-100} before checking out that many branches yet' '
test_must_fail git merge @{-100}
'
+test_expect_success 'log -g @{-1}' '
+ git checkout -b last_branch &&
+ git checkout -b new_branch &&
+ echo "last_branch@{0}" >expect &&
+ git log -g --format=%gd @{-1} >actual &&
+ test_cmp expect actual
+'
+
test_done