git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Junio C Hamano <junio@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [GIT PULL] sh updates for 2.6.25
Date: Wed, 16 Apr 2008 13:17:42 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.00.0804161312330.2879@woody.linux-foundation.org> (raw)
In-Reply-To: <7vve2hpnz1.fsf@gitster.siamese.dyndns.org>



On Wed, 16 Apr 2008, Junio C Hamano wrote:
> 
> > @@ -388,6 +383,7 @@ do
> >  			;;
> >  		esac
> >  	esac
> > +	FIRSTLINE=$(head -1 "$dotest/final-commit")
> >  
> >  	resume=
> >  	if test "$interactive" = t
> > @@ -408,7 +404,6 @@ do
> >  		[aA]*) action=yes interactive= ;;
> >  		[nN]*) action=skip ;;
> >  		[eE]*) git_editor "$dotest/final-commit"
> > -		       SUBJECT=$(reread_subject "$dotest/final-commit")
> 
> This needs to be replaced with re-assignment to FIRSTLINE, as the user may
> have fixed the title in the editor; otherwise...

Hmm. I think we could just have moved the assignment of FIRSTLINE it down, 
and had it in just one place. I see you already fixed it up, but maybe a 
patch like this is still a worthy cleanup.

That said - I didn't check that there isn't some subtle intermediate user 
or a break out of the loop or something. So while this patch _looks_ 
obvious and passes the tests, I'm not going to guarantee that there isn't 
some special case. I doubt any of the tests really check things like the 
reflog comments after git-am etc..

		Linus

---
 git-am.sh |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index 245e1db..9a865cc 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -383,7 +383,6 @@ do
 			;;
 		esac
 	esac
-	FIRSTLINE=$(head -1 "$dotest/final-commit")
 
 	resume=
 	if test "$interactive" = t
@@ -404,7 +403,6 @@ do
 		[aA]*) action=yes interactive= ;;
 		[nN]*) action=skip ;;
 		[eE]*) git_editor "$dotest/final-commit"
-		       FIRSTLINE=$(head -1 "$dotest/final-commit")
 		       action=again ;;
 		[vV]*) action=again
 		       LESS=-S ${PAGER:-less} "$dotest/patch" ;;
@@ -427,6 +425,7 @@ do
 		stop_here $this
 	fi
 
+	FIRSTLINE=$(head -1 "$dotest/final-commit")
 	printf 'Applying %s\n' "$FIRSTLINE"
 
 	case "$resolved" in

  reply	other threads:[~2008-04-16 20:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080415172333.GA29489@linux-sh.org>
2008-04-15 18:01 ` [GIT PULL] sh updates for 2.6.25 Linus Torvalds
2008-04-15 18:18   ` Linus Torvalds
2008-04-15 18:30   ` Paul Mundt
2008-04-15 19:56     ` Linus Torvalds
2008-04-16 18:54       ` Alex Riesen
2008-04-16 20:02       ` Junio C Hamano
2008-04-16 20:17         ` Linus Torvalds [this message]
2008-04-15 18:41   ` Junio C Hamano
2008-04-15 18:43   ` Jakub Narebski
2008-04-16  0:37     ` Miklos Vajna
2008-04-16  1:06       ` [PATCH] format-patch: Make sure the subject is always a one-liner Miklos Vajna
2008-04-16  3:25       ` [GIT PULL] sh updates for 2.6.25 Junio C Hamano
2008-04-16  8:44         ` Miklos Vajna
2008-04-16 19:58           ` Re* " Junio C Hamano
2008-04-16 20:22             ` Jakub Narebski
2008-04-17 21:38             ` Miklos Vajna
2008-04-27 19:04   ` David Woodhouse

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=alpine.LFD.1.00.0804161312330.2879@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=junio@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.
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).