summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-02-05 12:02:29 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-02-05 12:02:29 -0800
commit2171c0c36fb1edbacf17c14490cbe935269dcd04 (patch)
treed52bfe4097eeb3a9910dfb5f8efdd8b5244855c8
parentGit 1.9-rc2 (diff)
parentrepack.c: rename and unlink pack file if it exists (diff)
downloadtgif-2171c0c36fb1edbacf17c14490cbe935269dcd04.tar.xz
Merge branch 'tb/repack-fix-renames' (early part)
Finishing touches to the "rewrite repack in C" series. * 'tb/repack-fix-renames' (early part): repack.c: rename and unlink pack file if it exists
-rw-r--r--builtin/repack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/repack.c b/builtin/repack.c
index 6284846d82..bb2314c9cb 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -258,7 +258,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
for_each_string_list_item(item, &names) {
for (ext = 0; ext < 2; ext++) {
char *fname, *fname_old;
- fname = mkpathdup("%s/%s%s", packdir,
+ fname = mkpathdup("%s/pack-%s%s", packdir,
item->string, exts[ext]);
if (!file_exists(fname)) {
free(fname);
@@ -335,7 +335,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
for_each_string_list_item(item, &names) {
for (ext = 0; ext < 2; ext++) {
char *fname;
- fname = mkpath("%s/old-pack-%s%s",
+ fname = mkpath("%s/old-%s%s",
packdir,
item->string,
exts[ext]);