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

Re: [PATCH 9/9] trailer: add tests for "git interpret-trailers"

From
Josh Triplett <josh@joshtriplett.org>
Date
Dec 30, 2013, 22:27 UTC
Message-ID
<20131230222719.GN6840@leaf>
In-Reply-To
<xmqqfvpaqcbu.fsf@gitster.dls.corp.google.com>
On Mon, Dec 30, 2013 at 01:05:25PM -0800, Junio C Hamano wrote:
Show 10 quoted lines
> Josh Triplett <josh@joshtriplett.org> writes:
> >>  - With your scheme, if you already had _one_ trailing SPs in the
> >>    input, it would be hard to spot in the source;
> >
> > Git makes them quite difficult to miss. :)
> 
> That is irrelevant, isn't it?
> 
> This is about protecting the source in the editor, before you run
> "git show --whitespace=trailing-space", "git diff --check", etc.

That was exactly my point: such lines shouldn't exist, and rather than including the trailing space and following it with a character that then needs removing, it seems more sensible to me to omit the trailing space and insert it via an almost identical sed line. Git already helps ensure that trailing space won't exist on *any* line, including those; I don't see how an extra character after the space (making it no longer trailing space) makes it any more or less likely that those lines would have trailing space.

In any case, I don't care enough to argue the point further; it was just a style suggestion.

- Josh Triplett
Previous: Junio C Hamano
Message 17 of 17 in “Add interpret-trailers builtin”
  1. 0/9 Add interpret-trailers builtinChristian Couder, Dec 24, 2013
  2. 1/9 Add data structures and basic functions for commit trailersChristian Couder, Dec 24, 2013
  3. 2/9 trailer: process trailers from file and argumentsChristian Couder, Dec 24, 2013
  4. 3/9 trailer: read and process config informationChristian Couder, Dec 24, 2013
  5. Christian CouderDec 24, 2013
  6. 4/9 trailer: process command line trailer argumentsChristian Couder, Dec 24, 2013
  7. 5/9 strbuf: add strbuf_isspace()Christian Couder, Dec 24, 2013
  8. 6/9 trailer: parse trailers from input fileChristian Couder, Dec 24, 2013
  9. 7/9 trailer: put all the processing together and printChristian Couder, Dec 24, 2013
  10. 8/9 trailer: add interpret-trailers commandChristian Couder, Dec 24, 2013
  11. 9/9 trailer: add tests for "git interpret-trailers"Christian Couder, Dec 24, 2013
  12. Junio C HamanoDec 30, 2013
  13. Josh TriplettDec 30, 2013
  14. Junio C HamanoDec 30, 2013
  15. Josh TriplettDec 30, 2013
  16. Junio C HamanoDec 30, 2013
  17. Josh TriplettDec 30, 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.