config: don't implicitly use gitdir or commondir
[gitweb.git] / builtin / rerere.c
index 88e1359ebcaad338d96dd942a5f88f54d6cce271..ffb66e29073c07c43197ae34f2c31d3b9b610903 100644 (file)
@@ -1,5 +1,6 @@
 #include "builtin.h"
 #include "cache.h"
+#include "config.h"
 #include "dir.h"
 #include "parse-options.h"
 #include "string-list.h"
@@ -104,9 +105,9 @@ int cmd_rerere(int argc, const char **argv, const char *prefix)
                        return 0;
                for (i = 0; i < merge_rr.nr; i++) {
                        const char *path = merge_rr.items[i].string;
-                       const char *name = (const char *)merge_rr.items[i].util;
-                       if (diff_two(rerere_path(name, "preimage"), path, path, path))
-                               die("unable to generate diff for %s", name);
+                       const struct rerere_id *id = merge_rr.items[i].util;
+                       if (diff_two(rerere_path(id, "preimage"), path, path, path))
+                               die("unable to generate diff for %s", rerere_path(id, NULL));
                }
        } else
                usage_with_options(rerere_usage, options);