diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-08-24 15:30:43 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-08-24 15:30:43 -0700 |
commit | 7b8419f0940dcb9c017fc66390dc6a6471ce5373 (patch) | |
tree | 88c8f8c4ae2a7c3441578757ed6adba68691b303 /wt-status.c | |
parent | Merge 'kn/for-each-tag-branch' into kn/for-each-tag (diff) | |
parent | memoize common git-path "constant" files (diff) | |
download | tgif-7b8419f0940dcb9c017fc66390dc6a6471ce5373.tar.xz |
Merge 'jk/git-path' into kn/for-each-tag
* jk/git-path:
memoize common git-path "constant" files
get_repo_path: refactor path-allocation
find_hook: keep our own static buffer
refs.c: remove_empty_directories can take a strbuf
refs.c: avoid git_path assignment in lock_ref_sha1_basic
refs.c: avoid repeated git_path calls in rename_tmp_log
refs.c: simplify strbufs in reflog setup and writing
path.c: drop git_path_submodule
refs.c: remove extra git_path calls from read_loose_refs
remote.c: drop extraneous local variable from migrate_file
prefer mkpathdup to mkpath in assignments
prefer git_pathdup to git_path in some possibly-dangerous cases
add_to_alternates_file: don't add duplicate entries
t5700: modernize style
cache.h: complete set of git_path_submodule helpers
cache.h: clarify documentation for git_path, et al
Diffstat (limited to 'wt-status.c')
-rw-r--r-- | wt-status.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wt-status.c b/wt-status.c index 04e01e4238..717fd48d13 100644 --- a/wt-status.c +++ b/wt-status.c @@ -1171,7 +1171,7 @@ static void show_rebase_in_progress(struct wt_status *s, status_printf_ln(s, color, _(" (use \"git rebase --abort\" to check out the original branch)")); } - } else if (state->rebase_in_progress || !stat(git_path("MERGE_MSG"), &st)) { + } else if (state->rebase_in_progress || !stat(git_path_merge_msg(), &st)) { print_rebase_state(s, state, color); if (s->hints) status_printf_ln(s, color, @@ -1368,7 +1368,7 @@ void wt_status_get_state(struct wt_status_state *state, struct stat st; unsigned char sha1[20]; - if (!stat(git_path("MERGE_HEAD"), &st)) { + if (!stat(git_path_merge_head(), &st)) { state->merge_in_progress = 1; } else if (!stat(git_path("rebase-apply"), &st)) { if (!stat(git_path("rebase-apply/applying"), &st)) { @@ -1387,7 +1387,7 @@ void wt_status_get_state(struct wt_status_state *state, state->rebase_in_progress = 1; state->branch = read_and_strip_branch("rebase-merge/head-name"); state->onto = read_and_strip_branch("rebase-merge/onto"); - } else if (!stat(git_path("CHERRY_PICK_HEAD"), &st) && + } else if (!stat(git_path_cherry_pick_head(), &st) && !get_sha1("CHERRY_PICK_HEAD", sha1)) { state->cherry_pick_in_progress = 1; hashcpy(state->cherry_pick_head_sha1, sha1); @@ -1396,7 +1396,7 @@ void wt_status_get_state(struct wt_status_state *state, state->bisect_in_progress = 1; state->branch = read_and_strip_branch("BISECT_START"); } - if (!stat(git_path("REVERT_HEAD"), &st) && + if (!stat(git_path_revert_head(), &st) && !get_sha1("REVERT_HEAD", sha1)) { state->revert_in_progress = 1; hashcpy(state->revert_head_sha1, sha1); |