diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-04-26 15:39:08 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-26 15:39:08 +0900 |
commit | b80f629f5bcf798a3c9b37651d2369ad555e7382 (patch) | |
tree | 0a7ed758d7a74b96cb4bb713dbf66f9362a40b22 /builtin/pull.c | |
parent | 6cbc478d83b5773d1925869e50bf6067306f4817 (diff) | |
parent | 16d2676c9ee996208277772fdf81dda212355440 (diff) | |
download | git-b80f629f5bcf798a3c9b37651d2369ad555e7382.tar.gz |
Merge branch 'jk/war-on-git-path'
While handy, "git_path()" is a dangerous function to use as a
callsite that uses it safely one day can be broken by changes
to other code that calls it. Reduction of its use continues.
* jk/war-on-git-path:
am: drop "dir" parameter from am_state_init
replace strbuf_addstr(git_path()) with git_path_buf()
replace xstrdup(git_path(...)) with git_pathdup(...)
use git_path_* helper functions
branch: add edit_description() helper
bisect: add git_path_bisect_terms helper
Diffstat (limited to 'builtin/pull.c')
-rw-r--r-- | builtin/pull.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/pull.c b/builtin/pull.c index d8aa26d8ab..dd1a4a94e4 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -332,7 +332,7 @@ static int git_pull_config(const char *var, const char *value, void *cb) */ static void get_merge_heads(struct oid_array *merge_heads) { - const char *filename = git_path("FETCH_HEAD"); + const char *filename = git_path_fetch_head(); FILE *fp; struct strbuf sb = STRBUF_INIT; struct object_id oid; @@ -791,7 +791,7 @@ int cmd_pull(int argc, const char **argv, const char *prefix) if (read_cache_unmerged()) die_resolve_conflict("pull"); - if (file_exists(git_path("MERGE_HEAD"))) + if (file_exists(git_path_merge_head())) die_conclude_merge(); if (get_oid("HEAD", &orig_head)) |