summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-03-25 11:08:19 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-03-25 11:08:19 -0700
commit0e8c09263e87c548de006cdb6af035d42f845087 (patch)
treea233ed16bab9aa7cbe804d039e6d8a8ac4f52f09 /builtin
parentMerge branch 'jk/lib-terminal-lazy' (diff)
parentindex-pack: report error using the correct variable (diff)
downloadtgif-0e8c09263e87c548de006cdb6af035d42f845087.tar.xz
Merge branch 'nd/index-pack-error-message'
* nd/index-pack-error-message: index-pack: report error using the correct variable
Diffstat (limited to 'builtin')
-rw-r--r--builtin/index-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index a6b1c17996..b9f6e12c0e 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1291,7 +1291,7 @@ static void final(const char *final_pack_name, const char *curr_pack_name,
if (keep_fd < 0) {
if (errno != EEXIST)
die_errno(_("cannot write keep file '%s'"),
- keep_name);
+ keep_name ? keep_name : name);
} else {
if (keep_msg_len > 0) {
write_or_die(keep_fd, keep_msg, keep_msg_len);
@@ -1299,7 +1299,7 @@ static void final(const char *final_pack_name, const char *curr_pack_name,
}
if (close(keep_fd) != 0)
die_errno(_("cannot close written keep file '%s'"),
- keep_name);
+ keep_name ? keep_name : name);
report = "keep";
}
}