rebase -i: remove duplication

path_state_dir() and merge_dir() refer to the same path so remove one of them. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Phillip Wood committed Apr 17, 2019 at 15:30 UTC c44c24621da1cf45e2525b42d90982c78bffc207
1 file changed +2 -3
builtin/rebase.c
+2 -3
@@ -37,7 +37,6 @@ static char const * const builtin_rebase_usage[] = {
37 NULL
38 };
39
40 -static GIT_PATH_FUNC(path_state_dir, "rebase-merge/")
40 static GIT_PATH_FUNC(path_squash_onto, "rebase-merge/squash-onto")
41 static GIT_PATH_FUNC(path_interactive, "rebase-merge/interactive")
42 static GIT_PATH_FUNC(apply_dir, "rebase-apply")
@@ -182,8 +181,8 @@ static int init_basic_state(struct replay_opts *opts, const char *head_name,
181 {
182 FILE *interactive;
183
185 - if (!is_directory(path_state_dir()) && mkdir_in_gitdir(path_state_dir()))
186 - return error_errno(_("could not create temporary %s"), path_state_dir());
184 + if (!is_directory(merge_dir()) && mkdir_in_gitdir(merge_dir()))
185 + return error_errno(_("could not create temporary %s"), merge_dir());
186
187 delete_reflog("REBASE_HEAD");
188