aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-19 21:37:23 -0700
committerJunio C Hamano <gitster@pobox.com>2017-04-19 21:37:23 -0700
commitc2cbb30fc075d9bf926a739d05712b4debae4b97 (patch)
tree8a4d90d48391100c0ef9dfd30a6cc9c4e409d964 /t
parent442136f742b18872b292cc37ae4809d746791043 (diff)
parenteff451101dcdc6fe023861c6c02a9bacc43f372e (diff)
downloadgit-c2cbb30fc075d9bf926a739d05712b4debae4b97.tar.gz
git-c2cbb30fc075d9bf926a739d05712b4debae4b97.tar.xz
Merge branch 'ld/p4-current-branch-fix'
"git p4" used "name-rev HEAD" when it wants to learn what branch is checked out; it should use "symbolic-ref HEAD". * ld/p4-current-branch-fix: git-p4: don't use name-rev to get current branch git-p4: add read_pipe_text() internal function git-p4: add failing test for name-rev rather than symbolic-ref
Diffstat (limited to 't')
-rwxr-xr-xt/t9807-git-p4-submit.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh
index e37239e65..3457d5db6 100755
--- a/t/t9807-git-p4-submit.sh
+++ b/t/t9807-git-p4-submit.sh
@@ -139,6 +139,22 @@ test_expect_success 'submit with master branch name from argv' '
)
'
+test_expect_success 'allow submit from branch with same revision but different name' '
+ test_when_finished cleanup_git &&
+ git p4 clone --dest="$git" //depot &&
+ (
+ cd "$git" &&
+ test_commit "file8" &&
+ git checkout -b branch1 &&
+ git checkout -b branch2 &&
+ git config git-p4.skipSubmitEdit true &&
+ git config git-p4.allowSubmit "branch1" &&
+ test_must_fail git p4 submit &&
+ git checkout branch1 &&
+ git p4 submit
+ )
+'
+
#
# Basic submit tests, the five handled cases
#