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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 7, 2013, 17:21 UTC
Message-ID
<7va9pa5k9u.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1365335596-19917-1-git-send-email-git@cryptocrack.de>
Lukas Fleischer <git@cryptocrack.de> writes:
> While explicitly stating that the commit message in a prerequisite
> line is optional, 

Good spotting. What e9ee84cf28b6 (bundle: allowing to read from an unseekable fd, 2011-10-13) meant to say was the SP was optional but we want to allow a tip bundled to have a commit without any commit log message (hence making it "optional"), and the check you are looking at does try to enforce. What was buggy was that the comparison did not take into account that the codepath earlier called rtrim() on it, stripping "-<object name>SP<eol>" of the trailing SP it wants to look for.

As to the order of comparison to match the order on the number line, e.g. write "0 < something" or "negative < 0" to let readers more easily visualize in what relation on the number line the quantity of each side of the comparison stands, here is a reference to a long and amusing thread:

  http://thread.gmane.org/gmane.comp.version-control.git/3903/focus=3912

We never had any official guideline on which to use. A patch that changes an existing "b > a" to "a < b" (this directoin only) because of the above thread is _not_ "a patch to fix coding style", and is very much unwelcome.

Similarly, a patch that changes an existing "a < b" to "b > a" (or vice versa) only because the author thinks it is easier to read is not welcomed.

A switch done as a part of other meaningful rewrite is not a big enough deal to make a fuss over, though. Your patch falls into this category, I think.

Previous: Lukas FleischerNext: Junio C Hamano
Message 4 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.