Skip to content

Commit ce73bb2

Browse files
committed
Revert "sequencer: remove useless get_dir() function"
This reverts commit 39784cd. The function had only one caller when the "remove useless" was written, but another topic will soon make heavy use of it and more importantly the function will return different paths depending on the value in opts.
1 parent 39784cd commit ce73bb2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

sequencer.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ static inline int is_rebase_i(const struct replay_opts *opts)
4747
return 0;
4848
}
4949

50+
static const char *get_dir(const struct replay_opts *opts)
51+
{
52+
return git_path_seq_dir();
53+
}
54+
5055
static const char *get_todo_path(const struct replay_opts *opts)
5156
{
5257
return git_path_todo_file();
@@ -155,7 +160,7 @@ int sequencer_remove_state(struct replay_opts *opts)
155160
free(opts->xopts[i]);
156161
free(opts->xopts);
157162

158-
strbuf_addf(&dir, "%s", git_path_seq_dir());
163+
strbuf_addf(&dir, "%s", get_dir(opts));
159164
remove_dir_recursively(&dir, 0);
160165
strbuf_release(&dir);
161166

0 commit comments

Comments
 (0)