Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-03-07 08:25:32 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-07 08:25:33 +0300
commit11da0a558063a94498932ed3d73dbabf1bda6dd0 (patch)
tree6e99d5d76ca815bbd68d9e3ea06868fa6b90e49a /t/t3903-stash.sh
parent061fd5727ddafe6a751303587cf80ca2f956a273 (diff)
parentceaf037f617eb774bb8a451c1779dd9b8b12152a (diff)
Merge branch 'gc/stash-on-branch-with-multi-level-name'
"git checkout -b branch/with/multi/level/name && git stash" only recorded the last level component of the branch name, which has been corrected. * gc/stash-on-branch-with-multi-level-name: stash: strip "refs/heads/" with skip_prefix
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-xt/t3903-stash.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index d5ecee4fcc..f36e121210 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -1045,6 +1045,17 @@ test_expect_success 'create stores correct message' '
test_cmp expect actual
'
+test_expect_success 'create when branch name has /' '
+ test_when_finished "git checkout main" &&
+ git checkout -b some/topic &&
+ >foo &&
+ git add foo &&
+ STASH_ID=$(git stash create "create test message") &&
+ echo "On some/topic: create test message" >expect &&
+ git show --pretty=%s -s ${STASH_ID} >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'create with multiple arguments for the message' '
>foo &&
git add foo &&