summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-12-14 22:56:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-12-14 22:56:46 (GMT)
commitce73bb22d87abe16885b3e871a10de5a261e499f (patch)
tree4c9a5b2eb4277ca20791331e60bdfd65a78134a6
parent39784cd3620cc47415c9010ec58a9616f040125c (diff)
downloadgit-ce73bb22d87abe16885b3e871a10de5a261e499f.zip
git-ce73bb22d87abe16885b3e871a10de5a261e499f.tar.gz
git-ce73bb22d87abe16885b3e871a10de5a261e499f.tar.bz2
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.
-rw-r--r--sequencer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c
index 3ac4cb8..0b78f31 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -47,6 +47,11 @@ static inline int is_rebase_i(const struct replay_opts *opts)
return 0;
}
+static const char *get_dir(const struct replay_opts *opts)
+{
+ return git_path_seq_dir();
+}
+
static const char *get_todo_path(const struct replay_opts *opts)
{
return git_path_todo_file();
@@ -155,7 +160,7 @@ int sequencer_remove_state(struct replay_opts *opts)
free(opts->xopts[i]);
free(opts->xopts);
- strbuf_addf(&dir, "%s", git_path_seq_dir());
+ strbuf_addf(&dir, "%s", get_dir(opts));
remove_dir_recursively(&dir, 0);
strbuf_release(&dir);