From: Johan Herland Date: Wed, 29 Jul 2009 02:41:07 GMT Subject: Re: [RFC 06/11 v2] fast-import: Add support for importing commit notes Message-ID: <200907290441.08246.johan@herland.net> In-Reply-To: <7vskgg1bbt.fsf@alter.siamese.dyndns.org> On Wednesday 29 July 2009, Junio C Hamano wrote: > Johan Herland writes: > > +External data format:: > > + The data content for the note was already supplied by a prior > > + `blob` command. The frontend just needs to connect it to the > > + commit that is to be annotated. > > ++ > > +.... > > + 'N' SP SP LF > > +.... > > ++ > > +Here `` can be either a mark reference (`:`) > > +set by a prior `blob` command, or a full 40-byte SHA-1 of an > > +existing Git blob object. > > + > > +Inline data format:: > > + The data content for the note has not been supplied yet. > > + The frontend wants to supply it as part of this modify > > + command. > > ++ > > +.... > > + 'N' SP 'inline' SP LF > > + data > > +.... > > ++ > > +See below for a detailed description of the `data` command. > > + > > +In both formats `` is any of the commit specification > > +expressions also accepted by `from` (see above). > > Doesn't this make fast-import language incapable of add notes to anything > other than commits? As far as I remember, there is no such limitation in > the underlying data structure on git notes, even though the git-notes > sample Porcelain might have such a restriction. It does (probably because the default notes tree is "refs/notes/commits"). > We recently hit a similar unintended limitation that we regret in the > fast-import language, didn't we? I don't know. Must have slipped past my mailbox. > Although personally I do not think it is a big deal if we cannot tag or > add notes to trees, I am pointing it out in case other people care. I copied the semantics from the 'tag' command, for no particular reason (except following the git-notes procelain). Expanding 'notemodify' (and 'tag') to cover all types of objects is fine by me, unless there are good arguments otherwise. Shawn? Have fun! ...Johan -- Johan Herland, www.herland.net