summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/notes.c9
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);
}
}