Revert "sequencer: remove useless get_dir() function"

This reverts commit 39784cd3620cc47415c9010ec58a9616f040125c. 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.

Junio C Hamano committed Dec 14, 2016 at 14:56 UTC ce73bb22d87abe16885b3e871a10de5a261e499f
1 file changed +6 -1
sequencer.c
+6 -1
@@ -47,6 +47,11 @@ static inline int is_rebase_i(const struct replay_opts *opts)
47 return 0;
48 }
49
50 +static const char *get_dir(const struct replay_opts *opts)
51 +{
52 + return git_path_seq_dir();
53 +}
54 +
55 static const char *get_todo_path(const struct replay_opts *opts)
56 {
57 return git_path_todo_file();
@@ -155,7 +160,7 @@ int sequencer_remove_state(struct replay_opts *opts)
160 free(opts->xopts[i]);
161 free(opts->xopts);
162
158 - strbuf_addf(&dir, "%s", git_path_seq_dir());
163 + strbuf_addf(&dir, "%s", get_dir(opts));
164 remove_dir_recursively(&dir, 0);
165 strbuf_release(&dir);
166