Merge branch 'jh/empty-notes'
commit9b144d869f29902ec11b6a4e996ab155a49377d8
authorJunio C Hamano <gitster@pobox.com>
Fri, 5 Dec 2014 19:42:28 +0000 (5 11:42 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Dec 2014 19:42:29 +0000 (5 11:42 -0800)
tree7eb9f35fdd67613c0bbb84021e5439d2d06ebd6d
parent7f2186cadf4844616065c6175f179f1184c8fa75
parent908a3203632a02568df230c0fccf9a2cd8da24e6
Merge branch 'jh/empty-notes'

A request to store an empty note via "git notes" meant to remove
note from the object but with --allow-empty we will store a (surprise!)
note that is empty.  In the longer run, we might want to deprecate
the somewhat unintuitive "emptying means deletion" behaviour.

* jh/empty-notes:
  t3301: modernize style
  notes: empty notes should be shown by 'git log'
  builtin/notes: add --allow-empty, to allow storing empty notes
  builtin/notes: split create_note() to clarify add vs. remove logic
  builtin/notes: simplify early exit code in add()
  builtin/notes: refactor note file path into struct note_data
  builtin/notes: improve naming
  t3301: verify that 'git notes' removes empty notes by default
  builtin/notes: fix premature failure when trying to add the empty blob