From: Jeff King <peff@peff.net>
To: Csaba Henk <csaba@lowlife.hu>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: [PATCH 1/2] rebase: create HEAD reflog entry when aborting
Date: Fri, 27 May 2011 16:13:02 -0400 [thread overview]
Message-ID: <20110527201302.GA29836@sigill.intra.peff.net> (raw)
In-Reply-To: <BANLkTinyKQJQUHa8tn43=cCJMsVbgaZXjA@mail.gmail.com>
From: Csaba Henk <csaba@lowlife.hu>
When we abort a rebase, we return to the original value of
HEAD. Failing to write a reflog entry means we create a
gap in the reflog (which can cause "git show
HEAD@{5.minutes.ago}" to issue a warning). Plus having the
extra entry makes the reflog easier to follow for a human.
Signed-off-by: Jeff King <peff@peff.net>
---
This is the one that actually gave you trouble. It's different than
other cases (dealt with in 2/2) in that it actually creates a gap in the
reflog. So I think fixing it is the right thing to do, and your original
patch is fine.
git-rebase.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index 7a54bfc..57cbe49 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -332,7 +332,7 @@ abort)
read_basic_state
case "$head_name" in
refs/*)
- git symbolic-ref HEAD $head_name ||
+ git symbolic-ref -m "rebase: aborting" HEAD $head_name ||
die "Could not move back to $head_name"
;;
esac
--
1.7.5.3.12.g99e25
next prev parent reply other threads:[~2011-05-27 20:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 15:03 git symbolic-ref vs. reflog (vs. rebase) Csaba Henk
2011-04-29 16:19 ` Junio C Hamano
2011-04-29 17:21 ` Csaba Henk
2011-04-30 4:13 ` Jeff King
2011-05-02 8:46 ` Csaba Henk
2011-05-27 20:13 ` Jeff King [this message]
2011-05-27 20:16 ` [PATCH 2/2] rebase: write a reflog entry when finishing Jeff King
2011-04-29 22:48 ` git symbolic-ref vs. reflog (vs. rebase) Jeff King
2011-04-29 23:00 ` Junio C Hamano
2011-04-30 3:58 ` Jeff King
2011-05-02 8:38 ` Csaba Henk
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=20110527201302.GA29836@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=csaba@lowlife.hu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).