diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-03-31 15:32:48 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-31 15:32:48 -0700 |
commit | dda31145d79cc2408c248611013dfb0ad05e9636 (patch) | |
tree | 40a2d6b18e839879b1fe65c9a1720610c704d1fa /builtin/notes.c | |
parent | 5391e94813418dfb5ccc4c2f1d8518995b4f3ca5 (diff) | |
parent | f5c39c3268107e1f3def70709d509fd24282832c (diff) |
Merge branch 'ab/usage-die-message' into gc/branch-recurse-submodules-fix
* ab/usage-die-message:
config API: use get_error_routine(), not vreportf()
usage.c + gc: add and use a die_message_errno()
gc: return from cmd_gc(), don't call exit()
usage.c API users: use die_message() for error() + exit 128
usage.c API users: use die_message() for "fatal :" + exit 128
usage.c: add a die_message() routine
Diffstat (limited to 'builtin/notes.c')
-rw-r--r-- | builtin/notes.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/builtin/notes.c b/builtin/notes.c index 71c59583a1..2812d1eac4 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -201,11 +201,12 @@ static void prepare_note_data(const struct object_id *object, struct note_data * static void write_note_data(struct note_data *d, struct object_id *oid) { if (write_object_file(d->buf.buf, d->buf.len, blob_type, oid)) { - error(_("unable to write note object")); + int status = die_message(_("unable to write note object")); + if (d->edit_path) - error(_("the note contents have been left in %s"), - d->edit_path); - exit(128); + die_message(_("the note contents have been left in %s"), + d->edit_path); + exit(status); } } |