commit 0a6a3a0

default  ·  2023-06-18 17:09:37 +0000 UTC
parent 98d49ba
Avoid checking for deleted entries (starting with '-') in index_gc().
1 files changed,  +1, -1
M data.c
M data.c
+1, -1
1@@ -391,7 +391,7 @@ int index_gc(const char *fn)
2             while (fgets(line, sizeof(line), i) != NULL) {
3                 line[32] = '\0';
4 
5-                if (object_here_by_md5(line))
6+                if (line[0] != '-' && object_here_by_md5(line))
7                     fprintf(o, "%s\n", line);
8                 else
9                     gc++;