'git notes append' was taught '--separator' to specify string to insert
between paragraphs.
* tl/notes-separator:
notes: introduce "--no-separator" option
notes.c: introduce "--[no-]stripspace" option
notes.c: append separator instead of insert by pos
notes.c: introduce '--separator=<paragraph-break>' option
t3321: add test cases about the notes stripspace behavior
notes.c: use designated initializers for clarity
notes.c: cleanup 'strbuf_grow' call in 'append_edit'
* and builtin/tag.c by Kristian Høgsberg and Carlos Rica.
*/
-#include "cache.h"
-#include "alloc.h"
-#include "config.h"
#include "builtin.h"
+#include "config.h"
++#include "alloc.h"
+#include "editor.h"
+#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "notes.h"
if (launch_editor(d->edit_path, &d->buf, NULL)) {
die(_("please supply the note contents using either -m or -F option"));
}
- strbuf_stripspace(&d->buf, comment_line_char);
+ if (d->stripspace)
- strbuf_stripspace(&d->buf, 1);
++ strbuf_stripspace(&d->buf, comment_line_char);
}
}