From: Pratik Karki <predatoramigo@gmail.com>
To: git@vger.kernel.org
Cc: christian.couder@gmail.com, Johannes.Schindelin@gmx.de,
sbeller@google.com, alban.gruin@gmail.com, gitster@pobox.com,
Pratik Karki <predatoramigo@gmail.com>
Subject: [PATCH 7/7] builtin rebase: stop if `git am` is in progress
Date: Wed, 8 Aug 2018 20:51:22 +0545 [thread overview]
Message-ID: <20180808150622.9614-8-predatoramigo@gmail.com> (raw)
In-Reply-To: <20180808150622.9614-1-predatoramigo@gmail.com>
This commit checks for the file `applying` used by `git am` in
`rebase-apply/` and if the file is present it means `git am` is in
progress so it errors out.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
---
builtin/rebase.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 1344e071f3..75c4ac66e0 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -539,6 +539,11 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
git_config(rebase_config, &options);
+ strbuf_reset(&buf);
+ strbuf_addf(&buf, "%s/applying", apply_dir());
+ if(file_exists(buf.buf))
+ die(_("It looks like 'git am' is in progress. Cannot rebase."));
+
if (is_directory(apply_dir())) {
options.type = REBASE_AM;
options.state_dir = apply_dir();
--
2.18.0
prev parent reply other threads:[~2018-08-08 15:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-08 15:06 [GSoC] [PATCH 0/7] builtin rebase actions Pratik Karki
2018-08-08 15:06 ` [PATCH 1/7] builtin rebase: support --continue Pratik Karki
2018-08-08 15:06 ` [PATCH 2/7] builtin rebase: support --skip Pratik Karki
2018-08-08 15:06 ` [PATCH 3/7] builtin rebase: support --abort Pratik Karki
2018-08-08 15:06 ` [PATCH 4/7] builtin rebase: support --quit Pratik Karki
2018-08-08 15:06 ` [PATCH 5/7] builtin rebase: support --edit-todo and --show-current-patch Pratik Karki
2018-08-08 15:06 ` [PATCH 6/7] builtin rebase: actions require a rebase in progress Pratik Karki
2018-08-08 15:06 ` Pratik Karki [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180808150622.9614-8-predatoramigo@gmail.com \
--to=predatoramigo@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=alban.gruin@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sbeller@google.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).