summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-05 12:02:29 -0800
committerJunio C Hamano <gitster@pobox.com>2014-02-05 12:02:29 -0800
commit2171c0c36fb1edbacf17c14490cbe935269dcd04 (patch)
treed52bfe4097eeb3a9910dfb5f8efdd8b5244855c8
parentbe961c292f1d36097afa1690df68cf90f655c855 (diff)
parent9d7fbfd20422cd23fdb346ac8d609b45b4d37001 (diff)
downloadgit-2171c0c36fb1edbacf17c14490cbe935269dcd04.tar.gz
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]);