summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-21 22:15:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-09-21 22:15:24 (GMT)
commit48e1f8ed017295b1ba5e2e26752842a50f5e35cd (patch)
tree8b1542e6e60bea4c4f319b2852b9a1d86b55e1c0 /builtin
parentd845d727cb1935202b61a3b7b6c8cfa7c09bd204 (diff)
parentce25e4c78d38d88233f9b77ca8603c0bce74e8f1 (diff)
downloadgit-48e1f8ed017295b1ba5e2e26752842a50f5e35cd.zip
git-48e1f8ed017295b1ba5e2e26752842a50f5e35cd.tar.gz
git-48e1f8ed017295b1ba5e2e26752842a50f5e35cd.tar.bz2
Merge branch 'rs/checkout-some-states-are-const'
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 8013a1b..9941abc 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;