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

Re: [PATCH] fast-import: properly fanout notes when tree is imported

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 20, 2016, 19:34 UTC
Message-ID
<xmqqk2aujsyb.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20161219021212.15978-1-mh@glandium.org>
Mike Hommey <mh@glandium.org> writes:
Show 7 quoted lines
> In typical uses of fast-import, trees are inherited from a parent
> commit. In that case, the tree_entry for the branch looks like:
> ...
> +# Create another notes tree from the one above
> +cat >>input <<INPUT_END
> +...
> +M 040000 $(git log --no-walk --format=%T refs/notes/many_notes) 
There is a trailing SP that cannot be seen by anybody.

Don't do this. It makes it very easy to miss what is going on and wastes reviewers' time.

Protect it by doing something like:
	sed -e 's/Z$//' >>input <<INPUT_END
	...
	M 040000 $(git log --no-walk --format=%T refs/notes/many_notes) Z
Thanks.
Previous: Johan HerlandNext: Mike Hommey
Message 3 of 8 in “fast-import: properly fanout notes when tree is imported”
  1. fast-import: properly fanout notes when tree is importedMike Hommey, Dec 19, 2016
  2. Johan HerlandDec 19, 2016
  3. Junio C HamanoDec 20, 2016
  4. Mike HommeyDec 20, 2016
  5. Junio C HamanoDec 20, 2016
  6. fast-import: properly fanout notes when tree is importedMike Hommey, Dec 20, 2016
  7. Mike HommeyDec 20, 2016
  8. Junio C HamanoDec 20, 2016

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.