tar-tree: remove deprecated command
[gitweb.git] / builtin / repack.c
index 52846f8d7281cc114a34ac25baef69c25052dbe5..a0ff5c704f4e21c5021091aa7335e00959993470 100644 (file)
@@ -231,7 +231,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
 
        ret = start_command(&cmd);
        if (ret)
-               return 1;
+               return ret;
 
        nr_packs = 0;
        out = xfdopen(cmd.out, "r");
@@ -244,7 +244,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
        fclose(out);
        ret = finish_command(&cmd);
        if (ret)
-               return 1;
+               return ret;
        argv_array_clear(&cmd_args);
 
        if (!nr_packs && !quiet)
@@ -327,7 +327,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
                                chmod(fname_old, statbuffer.st_mode);
                        }
                        if (rename(fname_old, fname))
-                               exit(errno);
+                               die_errno(_("renaming '%s' failed"), fname_old);
                        free(fname);
                        free(fname_old);
                }
@@ -341,7 +341,8 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
                                        packdir,
                                        item->string,
                                        exts[ext]);
-                       remove_path(fname);
+                       if (remove_path(fname))
+                               warning(_("removing '%s' failed"), fname);
                }
        }