1
0
mirror of https://github.com/git/git.git synced 2024-09-28 04:10:41 +02:00

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
This commit is contained in:
Junio C Hamano 2014-02-05 12:02:29 -08:00
commit 2171c0c36f

View File

@ -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]);