Re: [PATCHv3 3/5] builtin/notes: Add --allow-empty, to allow storing empty notes

2014-11-10 Thread Junio C Hamano
Johan Herland writes: > On Fri, Nov 7, 2014 at 7:04 PM, Junio C Hamano wrote: > >> In other words, I have this suspicion that create_note() that >> removes is a wrong interface in the first place, and giving it >> a new allow_empty parameter to conditionally perform removal is >> making it worse

Re: [PATCHv3 3/5] builtin/notes: Add --allow-empty, to allow storing empty notes

2014-11-09 Thread Johan Herland
On Fri, Nov 7, 2014 at 7:04 PM, Junio C Hamano wrote: > Johan Herland writes: [...] > Assuming that it is a good idea to "allow" empty notes, I think > there are two issues involved here: > > * Traditionally, feeding an empty note is taken as a request to >remove an existing note. Therefo

Re: [PATCHv3 3/5] builtin/notes: Add --allow-empty, to allow storing empty notes

2014-11-07 Thread Junio C Hamano
Johan Herland writes: > Although the "git notes" man page advertises that we support binary-safe > notes addition (using the -C option), we currently do not support adding > the empty note (i.e. using the empty blob to annotate an object). Instead, > an empty note is always treated as an intent t

[PATCHv3 3/5] builtin/notes: Add --allow-empty, to allow storing empty notes

2014-11-07 Thread Johan Herland
Although the "git notes" man page advertises that we support binary-safe notes addition (using the -C option), we currently do not support adding the empty note (i.e. using the empty blob to annotate an object). Instead, an empty note is always treated as an intent to remove the note altogether. I