Files
git/builtin
Johan Herland 52694cdabb builtin/notes: split create_note() to clarify add vs. remove logic
create_note() has a non-trivial interface, and comprises three loosely
related parts:

 1. launching the editor with the note contents, if needed
 2. appending to an existing note, if append_only was given
 3. adding or removing the resulting note, based on whether it's non-empty

Split it along those lines to make the logic clearer: The first part
goes into a new function - prepare_note_data(), with a simpler interface.
The second part is moved into append_edit(), which is the only user of
this code. Finally, the add vs. remove decision is moved into the callers
(add() and append_edit()), keeping the logic for writing the actual note
object in a separate function: write_note_data().

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-12 10:59:50 -08:00
..
2014-07-16 11:10:11 -07:00
2014-10-21 13:28:10 -07:00
2014-10-20 12:23:48 -07:00
2014-10-24 14:59:10 -07:00
2014-10-21 13:28:10 -07:00
2014-10-20 12:23:48 -07:00
2014-01-17 12:21:20 -08:00
2014-10-10 16:02:26 -07:00
2014-09-02 13:28:44 -07:00
2014-10-21 13:28:10 -07:00
2014-09-02 12:00:30 -07:00
2014-10-29 10:07:56 -07:00
2014-10-31 11:49:55 -07:00
2014-10-29 10:07:56 -07:00
2014-04-30 10:30:02 -07:00
2014-10-08 13:05:25 -07:00