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()
This commit is contained in:
Junio C Hamano 2016-09-21 15:15:24 -07:00
commit 48e1f8ed01

View file

@ -154,8 +154,8 @@ static int check_stages(unsigned stages, const struct cache_entry *ce, int pos)
return 0; return 0;
} }
static int checkout_stage(int stage, struct cache_entry *ce, int pos, static int checkout_stage(int stage, const struct cache_entry *ce, int pos,
struct checkout *state) const struct checkout *state)
{ {
while (pos < active_nr && while (pos < active_nr &&
!strcmp(active_cache[pos]->name, ce->name)) { !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); 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]; struct cache_entry *ce = active_cache[pos];
const char *path = ce->name; const char *path = ce->name;