summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-05-25 19:01:50 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-05-25 19:01:50 -0700
commit2c5942dbae01e5c23d2b68aced019702eb256ad9 (patch)
tree38b103a22d51dc22835a06d375bab806c513acdb /fast-import.c
parentMerge branch 'jk/maint-add-empty' into maint (diff)
parentprint unlink(2) errno in copy_or_link_directory (diff)
downloadtgif-2c5942dbae01e5c23d2b68aced019702eb256ad9.tar.xz
Merge branch 'ar/unlink-err' into maint
* ar/unlink-err: print unlink(2) errno in copy_or_link_directory replace direct calls to unlink(2) with unlink_or_warn Introduce an unlink(2) wrapper which gives warning if unlink failed
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fast-import.c b/fast-import.c
index e9d23ffb2f..a2a24588a9 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -931,7 +931,7 @@ static void unkeep_all_packs(void)
struct packed_git *p = all_packs[k];
snprintf(name, sizeof(name), "%s/pack/pack-%s.keep",
get_object_directory(), sha1_to_hex(p->sha1));
- unlink(name);
+ unlink_or_warn(name);
}
}
@@ -981,7 +981,7 @@ static void end_packfile(void)
}
else {
close(old_p->pack_fd);
- unlink(old_p->pack_name);
+ unlink_or_warn(old_p->pack_name);
}
free(old_p);