Merge git://ozlabs.org/~paulus/gitk
[gitweb.git] / builtin / notes.c
index 3608c64785283ffe7cec6df425618a279d1616c5..515cebbeb8a33eb982a1ddccdc9d69e09beefb1d 100644 (file)
@@ -19,7 +19,7 @@
 #include "string-list.h"
 #include "notes-merge.h"
 #include "notes-utils.h"
-#include "branch.h"
+#include "worktree.h"
 
 static const char * const git_notes_usage[] = {
        N_("git notes [--ref <notes-ref>] [list [<object>]]"),
@@ -192,7 +192,7 @@ static void prepare_note_data(const unsigned char *object, struct note_data *d,
                if (launch_editor(d->edit_path, &d->buf, NULL)) {
                        die(_("Please supply the note contents using either -m or -F option"));
                }
-               stripspace(&d->buf, 1);
+               strbuf_stripspace(&d->buf, 1);
        }
 }
 
@@ -215,7 +215,7 @@ static int parse_msg_arg(const struct option *opt, const char *arg, int unset)
        if (d->buf.len)
                strbuf_addch(&d->buf, '\n');
        strbuf_addstr(&d->buf, arg);
-       stripspace(&d->buf, 0);
+       strbuf_stripspace(&d->buf, 0);
 
        d->given = 1;
        return 0;
@@ -232,7 +232,7 @@ static int parse_file_arg(const struct option *opt, const char *arg, int unset)
                        die_errno(_("cannot read '%s'"), arg);
        } else if (strbuf_read_file(&d->buf, arg, 1024) < 0)
                die_errno(_("could not open or read '%s'"), arg);
-       stripspace(&d->buf, 0);
+       strbuf_stripspace(&d->buf, 0);
 
        d->given = 1;
        return 0;