files-backend: don't rewrite the `packed-refs` file unnecessarily
[gitweb.git] / builtin / pack-objects.c
index e730b415bfdbe5f00e08cb28c8cced817067cfee..82ad6e0c813375b480129c22035afc4d6674992a 100644 (file)
@@ -25,6 +25,7 @@
 #include "sha1-array.h"
 #include "argv-array.h"
 #include "mru.h"
+#include "packfile.h"
 
 static const char *pack_usage[] = {
        N_("git pack-objects --stdout [<options>...] [< <ref-list> | < <object-list>]"),
@@ -1289,7 +1290,7 @@ static int done_pbase_path_pos(unsigned hash)
 
 static int check_pbase_path(unsigned hash)
 {
-       int pos = (!done_pbase_paths) ? -1 : done_pbase_path_pos(hash);
+       int pos = done_pbase_path_pos(hash);
        if (0 <= pos)
                return 1;
        pos = -pos - 1;