branch.c: remove the_repository reference
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
69d2cfe6e8
commit
4edce1729a
@ -753,7 +753,8 @@ static void update_refs_for_switch(const struct checkout_opts *opts,
|
||||
free(refname);
|
||||
}
|
||||
else
|
||||
create_branch(opts->new_branch, new_branch_info->name,
|
||||
create_branch(the_repository,
|
||||
opts->new_branch, new_branch_info->name,
|
||||
opts->new_branch_force ? 1 : 0,
|
||||
opts->new_branch_force ? 1 : 0,
|
||||
opts->new_branch_log,
|
||||
@ -811,7 +812,7 @@ static void update_refs_for_switch(const struct checkout_opts *opts,
|
||||
delete_reflog(old_branch_info->path);
|
||||
}
|
||||
}
|
||||
remove_branch_state();
|
||||
remove_branch_state(the_repository);
|
||||
strbuf_release(&msg);
|
||||
if (!opts->quiet &&
|
||||
(new_branch_info->path || (!opts->force_detach && !strcmp(new_branch_info->name, "HEAD"))))
|
||||
|
Reference in New Issue
Block a user