Explorar el Código

Avoid checking for deleted entries (starting with '-') in index_gc().

default hace 3 años
padre
commit
0a6a3a0a9a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      data.c

+ 1 - 1
data.c

@@ -391,7 +391,7 @@ int index_gc(const char *fn)
             while (fgets(line, sizeof(line), i) != NULL) {
             while (fgets(line, sizeof(line), i) != NULL) {
                 line[32] = '\0';
                 line[32] = '\0';
 
 
-                if (object_here_by_md5(line))
+                if (line[0] != '-' && object_here_by_md5(line))
                     fprintf(o, "%s\n", line);
                     fprintf(o, "%s\n", line);
                 else
                 else
                     gc++;
                     gc++;