Skip to content

Commit c44c246

Browse files
phillipwoodgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0609b74 commit c44c246

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

builtin/rebase.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ static char const * const builtin_rebase_usage[] = {
3737
NULL
3838
};
3939

40-
static GIT_PATH_FUNC(path_state_dir, "rebase-merge/")
4140
static GIT_PATH_FUNC(path_squash_onto, "rebase-merge/squash-onto")
4241
static GIT_PATH_FUNC(path_interactive, "rebase-merge/interactive")
4342
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,
182181
{
183182
FILE *interactive;
184183

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());
187186

188187
delete_reflog("REBASE_HEAD");
189188

0 commit comments

Comments
 (0)