aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-01-07 12:40:59 -0800
committerJunio C Hamano <gitster@pobox.com>2015-01-07 12:41:00 -0800
commitda178ac793047c41e4806a3c32fb421992642683 (patch)
tree65b6053da74fc52bccd25efe3687b71c3af57dd4 /t
parentc5b9256360b06efb9453c1627b78b14598e288b8 (diff)
parent05e73682cd28eeaf6d949badefd85b94244fca3f (diff)
downloadgit-da178ac793047c41e4806a3c32fb421992642683.tar.gz
git-da178ac793047c41e4806a3c32fb421992642683.tar.xz
Merge branch 'jc/checkout-local-track-report'
The report from "git checkout" on a branch that builds on another local branch by setting its branch.*.merge to branch name (not a full refname) incorrectly said that the upstream is gone. * jc/checkout-local-track-report: checkout: report upstream correctly even with loosely defined branch.*.merge
Diffstat (limited to 't')
-rwxr-xr-xt/t2024-checkout-dwim.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t2024-checkout-dwim.sh b/t/t2024-checkout-dwim.sh
index 6ecb55946..468a000e4 100755
--- a/t/t2024-checkout-dwim.sh
+++ b/t/t2024-checkout-dwim.sh
@@ -185,4 +185,22 @@ test_expect_success 'checkout <branch> -- succeeds, even if a file with the same
test_branch_upstream spam repo_c spam
'
+test_expect_success 'loosely defined local base branch is reported correctly' '
+
+ git checkout master &&
+ git branch strict &&
+ git branch loose &&
+ git commit --allow-empty -m "a bit more" &&
+
+ test_config branch.strict.remote . &&
+ test_config branch.loose.remote . &&
+ test_config branch.strict.merge refs/heads/master &&
+ test_config branch.loose.merge master &&
+
+ git checkout strict | sed -e "s/strict/BRANCHNAME/g" >expect &&
+ git checkout loose | sed -e "s/loose/BRANCHNAME/g" >actual &&
+
+ test_cmp expect actual
+'
+
test_done