Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-05-18 01:51:51 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-18 02:13:10 +0300
commit102de880d24fe66a8916e7c984e5bf8db6be047c (patch)
tree0368ad2a280ca777b8edf01e77fb0ed1258c8c32 /builtin/fetch.c
parent0437a2e365f3b9156097d029ca6f91cbb8bffd5e (diff)
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 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 55140671ef..41d74c7e8d 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -767,7 +767,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
const char *what, *kind;
struct ref *rm;
char *url;
- const char *filename = dry_run ? "/dev/null" : git_path_fetch_head();
+ const char *filename = dry_run ? "/dev/null" : git_path_fetch_head(the_repository);
int want_status;
int summary_width = transport_summary_width(ref_map);
@@ -1019,7 +1019,7 @@ static void check_not_current_branch(struct ref *ref_map)
static int truncate_fetch_head(void)
{
- const char *filename = git_path_fetch_head();
+ const char *filename = git_path_fetch_head(the_repository);
FILE *fp = fopen_for_writing(filename);
if (!fp)