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
Mike Hommey <mh@glandium.org>
Date
Dec 20, 2016, 20:48 UTC
Message-ID
<20161220204841.awvabgwsxudxfzca@glandium.org>
In-Reply-To
<xmqqk2aujsyb.fsf@gitster.mtv.corp.google.com>
On Tue, Dec 20, 2016 at 11:34:04AM -0800, Junio C Hamano wrote:
Show 20 quoted lines
> Mike Hommey <mh@glandium.org> writes:
> 
> > 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

How about EMPTY= ... M 040000 $(git log --no-walk --format=%T refs/notes/many_notes) $EMPTY

?
Mike
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 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.