summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-09-29 16:49:35 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-09-29 16:49:35 -0700
commit3a3bb36514921bd5d5f2fc04af3e657b3b071d83 (patch)
tree7a53c54f6a12cb93ca66cf8d948d89121135e922 /builtin
parentMerge branch 'bw/pathspec-remove-unused-extern-decl' into maint (diff)
parentcheckout: constify parameters of checkout_stage() and checkout_merged() (diff)
downloadtgif-3a3bb36514921bd5d5f2fc04af3e657b3b071d83.tar.xz
Merge branch 'rs/checkout-some-states-are-const' into maint
Code cleanup. * rs/checkout-some-states-are-const: checkout: constify parameters of checkout_stage() and checkout_merged()
Diffstat (limited to 'builtin')
-rw-r--r--builtin/checkout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 8672d0724f..afbff3e790 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -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;