diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-04-26 06:39:08 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-26 06:39:08 (GMT) |
commit | b80f629f5bcf798a3c9b37651d2369ad555e7382 (patch) | |
tree | 0a7ed758d7a74b96cb4bb713dbf66f9362a40b22 /notes-merge.c | |
parent | 6cbc478d83b5773d1925869e50bf6067306f4817 (diff) | |
parent | 16d2676c9ee996208277772fdf81dda212355440 (diff) | |
download | git-b80f629f5bcf798a3c9b37651d2369ad555e7382.zip git-b80f629f5bcf798a3c9b37651d2369ad555e7382.tar.gz git-b80f629f5bcf798a3c9b37651d2369ad555e7382.tar.bz2 |
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 'notes-merge.c')
-rw-r--r-- | notes-merge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/notes-merge.c b/notes-merge.c index 5998605..32caaaf 100644 --- a/notes-merge.c +++ b/notes-merge.c @@ -676,7 +676,7 @@ int notes_merge_commit(struct notes_merge_options *o, const char *msg = strstr(buffer, "\n\n"); int baselen; - strbuf_addstr(&path, git_path(NOTES_MERGE_WORKTREE)); + git_path_buf(&path, NOTES_MERGE_WORKTREE); if (o->verbosity >= 3) printf("Committing notes in notes merge worktree at %s\n", path.buf); @@ -741,7 +741,7 @@ int notes_merge_abort(struct notes_merge_options *o) struct strbuf buf = STRBUF_INIT; int ret; - strbuf_addstr(&buf, git_path(NOTES_MERGE_WORKTREE)); + git_path_buf(&buf, NOTES_MERGE_WORKTREE); if (o->verbosity >= 3) printf("Removing notes merge worktree at %s/*\n", buf.buf); ret = remove_dir_recursively(&buf, REMOVE_DIR_KEEP_TOPLEVEL); |