mirror of
https://github.com/git/git.git
synced 2024-11-24 18:33:43 +08:00
checkout: constify parameters of checkout_stage() and checkout_merged()
Document the fact that checkout_stage() and checkout_merged() don't change the objects passed to them by adding the modifier const. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
0b65a8dbdb
commit
ce25e4c78d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user