Skip to content

Commit

Permalink
Merge branch 'tb/repack-fix-renames' (early part)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Junio C Hamano committed Feb 5, 2014
2 parents be961c2 + 9d7fbfd commit 2171c0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin/repack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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]);
Expand Down

0 comments on commit 2171c0c

Please sign in to comment.