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