]> granicus.if.org Git - git/commitdiff
sequencer: export the function to get the path of `.git/rebase-merge/`
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 22 Oct 2019 23:30:21 +0000 (23:30 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Oct 2019 02:54:49 +0000 (11:54 +0900)
The presence of this path will be used in the next commit to fix an
incorrect piece of advice in `git commit` when in the middle of a
rebase.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
sequencer.h

index 9d5964fd81fe09985c9283c49ad83f98b055d661..5bd7e9d05aaa1dc768a1d7cd5e02b5b6ef6dc9de 100644 (file)
@@ -47,7 +47,7 @@ static GIT_PATH_FUNC(git_path_opts_file, "sequencer/opts")
 static GIT_PATH_FUNC(git_path_head_file, "sequencer/head")
 static GIT_PATH_FUNC(git_path_abort_safety_file, "sequencer/abort-safety")
 
-static GIT_PATH_FUNC(rebase_path, "rebase-merge")
+GIT_PATH_FUNC(git_path_rebase_merge_dir, "rebase-merge")
 /*
  * The file containing rebase commands, comments, and empty lines.
  * This file is created by "git rebase -i" then edited by the user. As
@@ -218,7 +218,7 @@ static inline int is_rebase_i(const struct replay_opts *opts)
 static const char *get_dir(const struct replay_opts *opts)
 {
        if (is_rebase_i(opts))
-               return rebase_path();
+               return git_path_rebase_merge_dir();
        return git_path_seq_dir();
 }
 
index 574260f6215f60e8c1aedb227c80a26c34da6c94..505852d7d15c11b7668be06cd965dae6af103295 100644 (file)
@@ -9,6 +9,7 @@ struct repository;
 
 const char *git_path_commit_editmsg(void);
 const char *git_path_seq_dir(void);
+const char *git_path_rebase_merge_dir(void);
 const char *rebase_path_todo(void);
 const char *rebase_path_todo_backup(void);