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

Re: [PATCH] for-each-ref: add option to omit newlines

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 14, 2014, 23:24 UTC
Message-ID
<xmqq1tz5gtvg.fsf@gitster.dls.corp.google.com>
In-Reply-To
<loom.20140215T000328-538@post.gmane.org>
Øystein Walle <oystwa@gmail.com> writes:
> Maybe it's all subjective... I'm okay with just leaving things as they
> are.

Lack of "-z" in for-each-ref can be called an inconsistency that already exists you may want to fix in any case.

As an extension to that, I would not be fundamentally against a new option, e.g. "--terminiator=7", that causes us to use putchar(7) instead of putchar('\n') or putchar('\0') to terminate each records. At that point, "-z" becomes a synonym for "--terminator=0".

And "--terminator=''" might even be a natural extension to that option to cause us not to call any putchar() there.

If we were to do that, we should do them for all commands that let you use "-z", not just for-each-ref, for consistency reasons, I would think.

Previous: Øystein Walle
Message 7 of 7 in “for-each-ref: add option to omit newlines”
  1. for-each-ref: add option to omit newlinesØystein Walle, Feb 13, 2014
  2. Øystein WalleFeb 13, 2014
  3. Junio C HamanoFeb 13, 2014
  4. Øystein WalleFeb 14, 2014
  5. Junio C HamanoFeb 14, 2014
  6. Øystein WalleFeb 14, 2014
  7. Junio C HamanoFeb 14, 2014

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.