aboutsummaryrefslogtreecommitdiff
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-05-08 16:47:30 +0700
committerJunio C Hamano <gitster@pobox.com>2016-05-09 12:29:08 -0700
commit54d47394b4307a0c9149007bd3d396b8eda8e995 (patch)
treedfe5e148abf3a3017650e8fbefaef1b851b2bb5d /builtin/pack-objects.c
parent62f94d54a98983a19cc9dc82daec5c76df466b0b (diff)
downloadgit-54d47394b4307a0c9149007bd3d396b8eda8e995.tar.gz
git-54d47394b4307a0c9149007bd3d396b8eda8e995.tar.xz
builtin/pack-objects.c: use die_errno() and warning_errno()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r--builtin/pack-objects.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index a27de5b32..114574742 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -828,8 +828,7 @@ static void write_pack_file(void)
* to preserve this property.
*/
if (stat(pack_tmp_name, &st) < 0) {
- warning("failed to stat %s: %s",
- pack_tmp_name, strerror(errno));
+ warning_errno("failed to stat %s", pack_tmp_name);
} else if (!last_mtime) {
last_mtime = st.st_mtime;
} else {
@@ -837,8 +836,7 @@ static void write_pack_file(void)
utb.actime = st.st_atime;
utb.modtime = --last_mtime;
if (utime(pack_tmp_name, &utb) < 0)
- warning("failed utime() on %s: %s",
- pack_tmp_name, strerror(errno));
+ warning_errno("failed utime() on %s", pack_tmp_name);
}
strbuf_addf(&tmpname, "%s-", base_name);