From: Junio C Hamano <gitster@pobox.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Cosmetic git-am interactive bug
Date: Tue, 04 Dec 2007 23:01:30 -0800 [thread overview]
Message-ID: <7v8x491v79.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 4755A836.1050408@garzik.org
Jeff Garzik <jeff@garzik.org> writes:
> The use of the older one-line summary led me to believe that it had
> not committed my changelog edits. Looking at the result, however,
> proved that the commit changelog was my new, corrected version.
I knew about this for quite some time but it was a very low priority for
me. This should fix it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
diff --git a/git-am.sh b/git-am.sh
index 2e40708..339d863 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -117,6 +117,10 @@ It does not apply to blobs recorded in its index."
unset GITHEAD_$his_tree
}
+reread_subject () {
+ git stripspace <"$1" | sed -e 1q
+}
+
prec=4
dotest=.dotest sign= utf8=t keep= skip= interactive= resolved= binary=
resolvemsg= resume=
@@ -376,6 +380,7 @@ do
[aA]*) action=yes interactive= ;;
[nN]*) action=skip ;;
[eE]*) git_editor "$dotest/final-commit"
+ SUBJECT=$(reread_subject "$dotest/final-commit")
action=again ;;
[vV]*) action=again
LESS=-S ${PAGER:-less} "$dotest/patch" ;;
next prev parent reply other threads:[~2007-12-05 7:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-04 19:19 Cosmetic git-am interactive bug Jeff Garzik
2007-12-05 7:01 ` Junio C Hamano [this message]
2007-12-05 23:58 ` Jeff Garzik
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=7v8x491v79.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jeff@garzik.org \
/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).