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

[PATCH 1/2] bundle: Accept prerequisites without commit messages

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

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. Fix this off-by-one error and only require lines with more than 40 characters to contain the separating space.

Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
---
 bundle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bundle.c b/bundle.c
index 505e07e..4b0e5cd 100644
--- a/bundle.c
+++ b/bundle.c
@@ -57,7 +57,7 @@ static int parse_bundle_header(int fd, struct bundle_header *header,
 		 * followed by SP and subject line.
 		 */
 		if (get_sha1_hex(buf.buf, sha1) ||
-		    (40 <= buf.len && !isspace(buf.buf[40])) ||
+		    (buf.len > 40 && !isspace(buf.buf[40])) ||
 		    (!is_prereq && buf.len <= 40)) {
 			if (report_path)
 				error(_("unrecognized header: %s%s (%d)"),
-- 
1.8.2.675.gda3bb24.dirty
Next: Lukas Fleischer
Message 1 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.