git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephan Beyer <s-beyer@gmx.net>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Stephan Beyer <s-beyer@gmx.net>
Subject: [PATCH] git-am: Add colon before the subject that is printed out as being applied
Date: Wed, 23 Jul 2008 18:46:36 +0200	[thread overview]
Message-ID: <1216831596-30870-1-git-send-email-s-beyer@gmx.net> (raw)

git-am output can be confusing, because the subject of the applied
patch can look like the rest of a sentence starting with "Applying".
The added colon should make this clearer.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
---
Hi,

Linus added single quotes to applypatch in 610968199,
writing:

    Add quotes around the subject line that we print out as being applied.

    My brain just flipped when it tried to read the "Applying" as part
    of the explanation of the patch, and the sentence didn't make any
    sense. The quotes make it clear what's going on.

I think he is right ;)

Of course, it's debatable whether
	Applying: foo
or
	Applying "foo"
or
	Applying 'foo'
may be the best. I don't really care :)

The main reason I chose the colon variant is because the change in t4151
is less ugly.

Another reason: thinking of "ambiguous" subjects:
 -	Applying "Remove "string" from foo.c"
 -	Applying 'Remove 'string' from foo.sh'
 -	Applying: foo.c: Remove "string"

Regards,
  Stephan

 git-am.sh           |    2 +-
 t/t4151-am-abort.sh |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index 7864b5f..f4abd9d 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -456,7 +456,7 @@ do
 		stop_here $this
 	fi
 
-	printf 'Applying %s\n' "$FIRSTLINE"
+	printf 'Applying: %s\n' "$FIRSTLINE"
 
 	case "$resolved" in
 	'')
diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh
index 249093b..f45ab0a 100755
--- a/t/t4151-am-abort.sh
+++ b/t/t4151-am-abort.sh
@@ -43,7 +43,7 @@ do
 
 	test_expect_success "am$with3 --skip continue after failed am$with3" '
 		test_must_fail git-am$with3 --skip >output &&
-		test "$(grep "^Applying" output)" = "Applying 6" &&
+		test "$(grep "^Applying" output)" = "Applying: 6" &&
 		test_cmp file-2-expect file-2 &&
 		test ! -f .git/rr-cache/MERGE_RR
 	'
-- 
1.6.0.rc0.102.ga1791

                 reply	other threads:[~2008-07-23 16:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1216831596-30870-1-git-send-email-s-beyer@gmx.net \
    --to=s-beyer@gmx.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=torvalds@linux-foundation.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).