summaryrefslogtreecommitdiff
path: root/branch.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-05-17 22:51:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-17 23:13:10 (GMT)
commit102de880d24fe66a8916e7c984e5bf8db6be047c (patch)
tree0368ad2a280ca777b8edf01e77fb0ed1258c8c32 /branch.c
parent0437a2e365f3b9156097d029ca6f91cbb8bffd5e (diff)
downloadgit-102de880d24fe66a8916e7c984e5bf8db6be047c.zip
git-102de880d24fe66a8916e7c984e5bf8db6be047c.tar.gz
git-102de880d24fe66a8916e7c984e5bf8db6be047c.tar.bz2
path.c: migrate global git_path_* to take a repository argument
Migrate all git_path_* functions that are defined in path.c to take a repository argument. Unlike other patches in this series, do not use the #define trick, as we rewrite the whole function, which is rather small. This doesn't migrate all the functions, as other builtins have their own local path functions defined using GIT_PATH_FUNC. So keep that macro around to serve the other locations. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'branch.c')
-rw-r--r--branch.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/branch.c b/branch.c
index 2672054..9b2742d 100644
--- a/branch.c
+++ b/branch.c
@@ -339,13 +339,13 @@ void create_branch(const char *name, const char *start_name,
void remove_branch_state(void)
{
- unlink(git_path_cherry_pick_head());
- unlink(git_path_revert_head());
- unlink(git_path_merge_head());
- unlink(git_path_merge_rr());
- unlink(git_path_merge_msg());
- unlink(git_path_merge_mode());
- unlink(git_path_squash_msg());
+ unlink(git_path_cherry_pick_head(the_repository));
+ unlink(git_path_revert_head(the_repository));
+ unlink(git_path_merge_head(the_repository));
+ unlink(git_path_merge_rr(the_repository));
+ unlink(git_path_merge_msg(the_repository));
+ unlink(git_path_merge_mode(the_repository));
+ unlink(git_path_squash_msg(the_repository));
}
void die_if_checked_out(const char *branch, int ignore_current_worktree)