sha1_array: let callbacks interrupt iteration
[gitweb.git] / builtin / checkout.c
index 8013a1b8b4d917f34c22932f0546a5f1f2e20f4c..9941abc3acdfa035387606f7ecc8f33905f80e7d 100644 (file)
@@ -154,8 +154,8 @@ static int check_stages(unsigned stages, const struct cache_entry *ce, int pos)
        return 0;
 }
 
-static int checkout_stage(int stage, struct cache_entry *ce, int pos,
-                         struct checkout *state)
+static int checkout_stage(int stage, const struct cache_entry *ce, int pos,
+                         const struct checkout *state)
 {
        while (pos < active_nr &&
               !strcmp(active_cache[pos]->name, ce->name)) {
@@ -169,7 +169,7 @@ static int checkout_stage(int stage, struct cache_entry *ce, int pos,
                return error(_("path '%s' does not have their version"), ce->name);
 }
 
-static int checkout_merged(int pos, struct checkout *state)
+static int checkout_merged(int pos, const struct checkout *state)
 {
        struct cache_entry *ce = active_cache[pos];
        const char *path = ce->name;