diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/notes.c | 2 | ||||
-rw-r--r-- | builtin/receive-pack.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/notes.c b/builtin/notes.c index 77573cf1ea..4303848e04 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -456,7 +456,7 @@ static int add(int argc, const char **argv, const char *prefix) oid_to_hex(&object)); } - prepare_note_data(&object, &d, note->hash); + prepare_note_data(&object, &d, note ? note->hash : NULL); if (d.buf.len || allow_empty) { write_note_data(&d, new_note.hash); if (add_note(t, &object, &new_note, combine_notes_overwrite)) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 136c44def7..14b6e09b42 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -1138,7 +1138,7 @@ static const char *update(struct command *cmd, struct shallow_info *si) } if (ref_transaction_delete(transaction, namespaced_name, - old_oid->hash, + old_oid ? old_oid->hash : NULL, 0, "push", &err)) { rp_error("%s", err.buf); strbuf_release(&err); |