git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] t5704: Test prerequisites with empty commit messages

From
LFLukas Fleischer <git@cryptocrack.de>
Date
Apr 7, 2013, 11:53 UTC
Message-ID
<1365335596-19917-2-git-send-email-git@cryptocrack.de>
In-Reply-To
<1365335596-19917-1-git-send-email-git@cryptocrack.de>

While stating that commit messages of prerequisites are optional in bundles, we used to disallow prerequisite lines consisting of an object name only. This behavior made `git bundle verify` and `git bundle unbundle` reject bundles that contain prerequisites without any commit message.

Add a test to reproduce this behavior.
Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
---
 t/t5704-bundle.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/t/t5704-bundle.sh b/t/t5704-bundle.sh
index 9e43731..a45c316 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
-- 
1.8.2.675.gda3bb24.dirty
Previous: Lukas FleischerNext: Lukas Fleischer
Message 2 of 7 in “bundle: Accept prerequisites without commit messages”
  1. 1/2 bundle: Accept prerequisites without commit messagesLukas Fleischer, Apr 7, 2013
  2. 2/2 t5704: Test prerequisites with empty commit messagesLukas Fleischer, Apr 7, 2013
  3. Lukas FleischerApr 7, 2013
  4. Junio C HamanoApr 7, 2013
  5. Junio C HamanoApr 7, 2013
  6. Jeff KingApr 8, 2013
  7. Lukas FleischerApr 8, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.