From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Rohit Ashiwal <rohit.ashiwal265@gmail.com>,
Johannes Schindelin <johannes.schindelin@gmx.de>,
Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH 2/3] sequencer: export the function to get the path of `.git/rebase-merge/`
Date: Tue, 22 Oct 2019 23:30:21 +0000 [thread overview]
Message-ID: <43211b82bcc5b18c90106ee4f01e180cad35ac87.1571787022.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.417.git.1571787022.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
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>
---
sequencer.c | 4 ++--
sequencer.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 9d5964fd81..5bd7e9d05a 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -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();
}
diff --git a/sequencer.h b/sequencer.h
index 574260f621..505852d7d1 100644
--- a/sequencer.h
+++ b/sequencer.h
@@ -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);
--
gitgitgadget
next prev parent reply other threads:[~2019-10-22 23:30 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 23:30 [PATCH 0/3] commit: fix advice for empty commits during rebases Johannes Schindelin via GitGitGadget
2019-10-22 23:30 ` [PATCH 1/3] cherry-pick: add test for `--skip` advice in `git commit` Johannes Schindelin via GitGitGadget
2019-10-22 23:30 ` Johannes Schindelin via GitGitGadget [this message]
2019-10-22 23:30 ` [PATCH 3/3] commit: give correct advice for empty commit during a rebase Johannes Schindelin via GitGitGadget
2019-10-23 2:45 ` Junio C Hamano
2019-10-24 10:15 ` Phillip Wood
2019-10-25 11:48 ` Johannes Schindelin
2019-10-25 14:01 ` Phillip Wood
2019-11-08 5:28 ` Junio C Hamano
2019-11-08 14:09 ` Johannes Schindelin
2019-11-11 16:13 ` Phillip Wood
2019-10-23 3:02 ` [PATCH 0/3] commit: fix advice for empty commits during rebases Junio C Hamano
2019-10-25 12:11 ` Johannes Schindelin
2019-10-29 2:05 ` Junio C Hamano
2019-10-29 13:00 ` Johannes Schindelin
2019-12-06 16:06 ` [PATCH v2 0/9] " Phillip Wood
2019-12-06 16:06 ` [PATCH v2 1/9] t3404: use test_cmp_rev Phillip Wood
2019-12-06 17:39 ` Junio C Hamano
2019-12-06 16:06 ` [PATCH v2 2/9] cherry-pick: add test for `--skip` advice in `git commit` Phillip Wood
2019-12-06 16:06 ` [PATCH v2 3/9] cherry-pick: check commit error messages Phillip Wood
2019-12-06 16:06 ` [PATCH v2 4/9] sequencer: write CHERRY_PICK_HEAD for reword and edit Phillip Wood
2019-12-06 16:06 ` [PATCH v2 5/9] commit: use enum value for multiple cherry-picks Phillip Wood
2019-12-06 18:13 ` Junio C Hamano
2019-12-06 16:06 ` [PATCH v2 6/9] commit: encapsulate determine_whence() for sequencer Phillip Wood
2019-12-06 18:24 ` Junio C Hamano
2019-12-18 14:26 ` Phillip Wood
2019-12-06 16:06 ` [PATCH v2 7/9] commit: give correct advice for empty commit during a rebase Phillip Wood
2019-12-06 16:06 ` [PATCH v2 8/9] [RFC] rebase: fix advice when a fixup creates an empty commit Phillip Wood
2020-02-26 19:45 ` Elijah Newren
2019-12-06 16:06 ` [PATCH v2 9/9] [RFC] rebase -i: leave CHERRY_PICK_HEAD when there are conflicts Phillip Wood
2019-12-18 14:35 ` Phillip Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43211b82bcc5b18c90106ee4f01e180cad35ac87.1571787022.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
--cc=rohit.ashiwal265@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).