aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-12-28 10:41:41 -0800
committerJunio C Hamano <gitster@pobox.com>2019-01-15 15:38:29 -0800
commit0aa9d8aa6ce429f0fa04e1ca819ed766c211e242 (patch)
treea1300182f22bf55f45b5769673cabc6535666dd7 /builtin/checkout.c
parentMerge branch 'sb/more-repo-in-api' into md/list-objects-filter-by-depth (diff)
parentrebase-interactive.c: remove the_repository references (diff)
downloadgit-0aa9d8aa6ce429f0fa04e1ca819ed766c211e242.tar.gz
git-0aa9d8aa6ce429f0fa04e1ca819ed766c211e242.zip
Merge branch 'nd/the-index' into md/list-objects-filter-by-depth
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index acdafc6e4c..169e797675 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -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"))))