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

Re: [PATCH] filter-branch: pass tag name via stdin without newline

From
Jeff King <peff@peff.net>
Date
Dec 7, 2015, 20:44 UTC
Message-ID
<20151207204440.GC30203@sigill.intra.peff.net>
In-Reply-To
<xmqqd1ujnf1i.fsf@gitster.mtv.corp.google.com>
On Sun, Dec 06, 2015 at 06:55:21PM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> "Eric N. Vander Weele" <ericvw@gmail.com> writes:
> 
> > "git filter-branch --tag-name-filter" fails when the user-provided
> > command attempts to trivially append text to the originally tag name,
> > passed via stdin, due to an unexpected newline ('\n').  The newline is
> > introduced due to "echo" piping the original tag name to the
> > user-provided tag name filter command.
> 
> Is there any other place where we feed such an incomplete line
> (i.e. a line without the terminating LF) to the filters in this
> command?

I suspect we would break filters if we did. On some systems, tools like `sed` and `tr` often behave funny when there is no trailing newline, but I do not recall all of the specific instances (if one felt like engaging in some light masochism, searching the mailing list archive will probably turn up results).

-Peff
Previous: Eric Vander Weele
Message 4 of 4 in “filter-branch: pass tag name via stdin without newline”
  1. filter-branch: pass tag name via stdin without newlineEric N. Vander Weele, Dec 7, 2015
  2. Junio C HamanoDec 7, 2015
  3. Eric Vander WeeleDec 7, 2015
  4. Jeff KingDec 7, 2015

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.