summaryrefslogtreecommitdiff
path: root/t/t2010-checkout-ambiguous.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-10-30 12:10:16 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-10-30 12:10:16 -0700
commitf101b888f278ca6ceaeef11fbee72c29e6dd9237 (patch)
tree196085a6cf8c9c2ef0d9cb347b95ff25e9c3b49a /t/t2010-checkout-ambiguous.sh
parentMerge branch 'sg/t3600-nul-sha1-fix' (diff)
parentcheckout: proper error message on 'git checkout foo bar --' (diff)
downloadtgif-f101b888f278ca6ceaeef11fbee72c29e6dd9237.tar.xz
Merge branch 'mm/checkout-auto-track-fix'
"git checkout topic", when there is not yet a local "topic" branch but there is a unique remote-tracking branch for a remote "topic" branch, pretended as if "git checkout -t -b topic remote/$r/topic" (for that unique remote $r) was run. This hack however was not implemented for "git checkout topic --". * mm/checkout-auto-track-fix: checkout: proper error message on 'git checkout foo bar --' checkout: allow dwim for branch creation for "git checkout $branch --"
Diffstat (limited to 't/t2010-checkout-ambiguous.sh')
-rwxr-xr-xt/t2010-checkout-ambiguous.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t2010-checkout-ambiguous.sh b/t/t2010-checkout-ambiguous.sh
index 7cc0a3582e..87bdf9c96b 100755
--- a/t/t2010-checkout-ambiguous.sh
+++ b/t/t2010-checkout-ambiguous.sh
@@ -47,4 +47,10 @@ test_expect_success 'disambiguate checking out from a tree-ish' '
git diff --exit-code --quiet
'
+test_expect_success 'accurate error message with more than one ref' '
+ test_must_fail git checkout HEAD master -- 2>actual &&
+ grep 2 actual &&
+ test_i18ngrep "one reference expected, 2 given" actual
+'
+
test_done