aboutsummaryrefslogtreecommitdiff
path: root/t/t5704-bundle.sh
diff options
context:
space:
mode:
authorLukas Fleischer <git@cryptocrack.de>2013-04-07 13:53:15 +0200
committerJunio C Hamano <gitster@pobox.com>2013-04-07 14:45:56 -0700
commit5446e33f35d6b27b6b760a59a6ded33fbd555190 (patch)
tree6e5cd11927d1aefc4da834c0e8bd0f428dfcdcee /t/t5704-bundle.sh
parent2137ce01f83d254e4917c107901a5a04f61e8c16 (diff)
downloadgit-5446e33f35d6b27b6b760a59a6ded33fbd555190.tar.gz
git-5446e33f35d6b27b6b760a59a6ded33fbd555190.tar.xz
bundle: Accept prerequisites without commit messages
While explicitly stating that the commit message in a prerequisite line is optional, we required all lines with 40 or more characters to contain a space after the object name, bailing out if a line consisted of an object name only. This was to allow bundling a history to a commit without an message, but the code forgot that it already called rtrim() to remove that whitespace. As a workaround, only check for SP when the line has more than 40 characters. Signed-off-by: Lukas Fleischer <git@cryptocrack.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5704-bundle.sh')
-rwxr-xr-xt/t5704-bundle.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t5704-bundle.sh b/t/t5704-bundle.sh
index 9e43731fe..a45c31692 100755
--- a/t/t5704-bundle.sh
+++ b/t/t5704-bundle.sh
@@ -58,4 +58,14 @@ test_expect_success 'ridiculously long subject in boundary' '
grep "^-[0-9a-f]\\{40\\} " boundary
'
+test_expect_success 'prerequisites with an empty commit message' '
+ : >file1 &&
+ git add file1 &&
+ test_tick &&
+ git commit --allow-empty-message -m "" &&
+ test_commit file2 &&
+ git bundle create bundle HEAD^.. &&
+ git bundle verify bundle
+'
+
test_done