summaryrefslogtreecommitdiff
path: root/builtin/notes.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-03-03 15:14:46 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-03-03 15:14:46 +0900
commit3815afa233c3938e6f4b67d2f5551297f0c45509 (patch)
treedb02b3f661487173141a3f4ea84fa32b563007ea /builtin/notes.c
parenta6b062f9873fedceda595670180829e84325440e (diff)
downloadgit-3815afa233c3938e6f4b67d2f5551297f0c45509.tar.gz
git-3815afa233c3938e6f4b67d2f5551297f0c45509.tar.bz2
git-3815afa233c3938e6f4b67d2f5551297f0c45509.zip
Imported Upstream version 2.2.0upstream/2.2.0
Diffstat (limited to 'builtin/notes.c')
-rw-r--r--builtin/notes.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/notes.c b/builtin/notes.c
index 820c3413..68b6cd8c 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -122,12 +122,11 @@ static void write_commented_object(int fd, const unsigned char *object)
{
const char *show_args[5] =
{"show", "--stat", "--no-notes", sha1_to_hex(object), NULL};
- struct child_process show;
+ struct child_process show = CHILD_PROCESS_INIT;
struct strbuf buf = STRBUF_INIT;
struct strbuf cbuf = STRBUF_INIT;
/* Invoke "git show --stat --no-notes $object" */
- memset(&show, 0, sizeof(show));
show.argv = show_args;
show.no_stdin = 1;
show.out = -1;
@@ -211,7 +210,7 @@ static void create_note(const unsigned char *object, struct msg_arg *msg,
if (write_sha1_file(msg->buf.buf, msg->buf.len, blob_type, result)) {
error(_("unable to write note object"));
if (path)
- error(_("The note contents has been left in %s"),
+ error(_("The note contents have been left in %s"),
path);
exit(128);
}
@@ -703,7 +702,7 @@ static int merge_commit(struct notes_merge_options *o)
init_notes(t, "NOTES_MERGE_PARTIAL", combine_notes_overwrite, 0);
o->local_ref = local_ref_to_free =
- resolve_refdup("NOTES_MERGE_REF", sha1, 0, NULL);
+ resolve_refdup("NOTES_MERGE_REF", 0, sha1, NULL);
if (!o->local_ref)
die("Failed to resolve NOTES_MERGE_REF");