Windows: A rudimentary poll() emulation.
[gitweb.git] / builtin-rerere.c
index b2971f34456d15cd155b9ac7d207602f9822d149..85222d9bc591e0b603bf6f33c32d6bb1bad479ee 100644 (file)
@@ -43,7 +43,7 @@ static void read_rr(struct path_list *rr)
                        ; /* do nothing */
                if (i == sizeof(buf))
                        die("filename too long");
-               path_list_insert(buf, rr)->util = xstrdup(name);
+               path_list_insert(buf, rr)->util = name;
        }
        fclose(in);
 }
@@ -149,8 +149,8 @@ static int find_conflict(struct path_list *conflict)
                if (ce_stage(e2) == 2 &&
                    ce_stage(e3) == 3 &&
                    ce_same_name(e2, e3) &&
-                   S_ISREG(ntohl(e2->ce_mode)) &&
-                   S_ISREG(ntohl(e3->ce_mode))) {
+                   S_ISREG(e2->ce_mode) &&
+                   S_ISREG(e3->ce_mode)) {
                        path_list_insert((const char *)e2->name, conflict);
                        i++; /* skip over both #2 and #3 */
                }
@@ -339,7 +339,7 @@ static int do_plain_rerere(struct path_list *rr, int fd)
        return write_rr(rr, fd);
 }
 
-static int git_rerere_config(const char *var, const char *value)
+static int git_rerere_config(const char *var, const char *value, void *cb)
 {
        if (!strcmp(var, "gc.rerereresolved"))
                cutoff_resolve = git_config_int(var, value);
@@ -348,7 +348,7 @@ static int git_rerere_config(const char *var, const char *value)
        else if (!strcmp(var, "rerere.enabled"))
                rerere_enabled = git_config_bool(var, value);
        else
-               return git_default_config(var, value);
+               return git_default_config(var, value, cb);
        return 0;
 }
 
@@ -376,7 +376,7 @@ static int setup_rerere(struct path_list *merge_rr)
 {
        int fd;
 
-       git_config(git_rerere_config);
+       git_config(git_rerere_config, NULL);
        if (!is_rerere_enabled())
                return -1;