From: Junio C Hamano <gitster@pobox.com>
To: "David A. Greene" <greened@obbligato.org>
Cc: git@vger.kernel.org, Techlive Zheng <techlivezheng@gmail.com>
Subject: Re: [PATCH 1/8] Use %B for Split Subject/Body
Date: Tue, 01 Jan 2013 13:25:30 -0800 [thread overview]
Message-ID: <7va9ssa94l.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1357012655-24974-2-git-send-email-greened@obbligato.org> (David A. Greene's message of "Mon, 31 Dec 2012 21:57:28 -0600")
"David A. Greene" <greened@obbligato.org> writes:
> Subject: Re: [PATCH 1/8] Use %B for Split Subject/Body
This needs to say "contrib/subtree" somewhere (applies to all
patches in this series).
> From: Techlive Zheng <techlivezheng@gmail.com>
>
> Use %B to format the commit message and body to avoid an extra newline
> if a commit only has a subject line.
>
> Author: Techlive Zheng <techlivezheng@gmail.com>
This needs to be a S-o-b instead; is it a real name, by the way?
> Signed-off-by: David A. Greene <greened@obbligato.org>
> ---
> contrib/subtree/git-subtree.sh | 5 +++
> contrib/subtree/t/t7900-subtree.sh | 73 ++++++++++++++++++++++--------------
> 2 files changed, 49 insertions(+), 29 deletions(-)
>
> diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
> index 920c664..f2b6d4a 100755
> --- a/contrib/subtree/git-subtree.sh
> +++ b/contrib/subtree/git-subtree.sh
> @@ -296,7 +296,12 @@ copy_commit()
> # We're going to set some environment vars here, so
> # do it in a subshell to get rid of them safely later
> debug copy_commit "{$1}" "{$2}" "{$3}"
> + # Use %B rather than %s%n%n%b to handle the special case of a
> + # commit that only has a subject line. We don't want to
> + # introduce a newline after the subject, causing generation of
> + # a new hash.
> git log -1 --pretty=format:'%an%n%ae%n%ad%n%cn%n%ce%n%cd%n%s%n%n%b' "$1" |
> +# git log -1 --pretty=format:'%an%n%ae%n%ad%n%cn%n%ce%n%cd%n%B' "$1" |
Is it really replacing %s%n%n%b with %B, or is it still an
experiment that is disabled?
> (
> read GIT_AUTHOR_NAME
> read GIT_AUTHOR_EMAIL
> diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
> index bc2eeb0..93eeb09 100755
> --- a/contrib/subtree/t/t7900-subtree.sh
> +++ b/contrib/subtree/t/t7900-subtree.sh
> @@ -76,6 +76,10 @@ test_expect_success 'add sub1' '
> git branch -m master subproj
> '
>
> +# Save this hash for testing later.
> +
> +subdir_hash=`git rev-parse HEAD`
> +
We prefer $() over ``; much more readable.
> # 3
> test_expect_success 'add sub2' '
> create sub2 &&
> @@ -155,7 +159,6 @@ test_expect_success 'add main-sub5' '
> create subdir/main-sub5 &&
> git commit -m "main-sub5"
> '
> -
> # 15
> test_expect_success 'add main6' '
> create main6 &&
Why?
> @@ -235,7 +238,19 @@ test_expect_success 'check split with --branch' '
> check_equal ''"$(git rev-parse splitbr1)"'' "$spl1"
Is quoting screwed up around here (and in many other places in this
patch)? What are these no-op '' doing?
> '
>
> -# 25
> +#25
Why the lossage of a SP?
It may make sense to lose these "# num" that will have to be touched
every time somebody inserts new test pieces in the middle, as a
preparatory step before any of these patches, by the way. That will
reduce noise in the patches for real changes.
next prev parent reply other threads:[~2013-01-01 21:25 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-01 3:57 git-subtree Patches to Apply David A. Greene
2013-01-01 3:57 ` [PATCH 1/8] Use %B for Split Subject/Body David A. Greene
2013-01-01 4:06 ` greened
2013-01-01 5:58 ` Junio C Hamano
2013-01-01 22:25 ` greened
2013-01-01 5:56 ` Junio C Hamano
2013-01-01 22:24 ` greened
[not found] ` <CAPYzjrTqmzuWoDg+zvLxwB7g6J4J2wbBqpL+UbHKRHcbjA4HrA@mail.gmail.com>
2013-01-07 15:00 ` 郑文辉(Techlive Zheng)
2013-01-07 15:18 ` 郑文辉(Techlive Zheng)
2013-01-07 16:53 ` Junio C Hamano
2013-01-01 21:25 ` Junio C Hamano [this message]
2013-01-01 22:29 ` greened
2013-01-02 0:30 ` Junio C Hamano
2013-01-08 10:40 ` greened
2013-01-01 3:57 ` [PATCH 2/8] Add --unannotate David A. Greene
2013-01-01 21:30 ` Junio C Hamano
2013-01-01 22:31 ` greened
2013-01-02 0:32 ` Junio C Hamano
2013-01-08 10:42 ` greened
2013-01-17 21:07 ` James Nylen
2013-01-22 8:44 ` greened
2013-01-22 16:04 ` Junio C Hamano
2013-01-01 3:57 ` [PATCH 3/8] Better Error Handling for add David A. Greene
2013-01-01 21:39 ` Junio C Hamano
2013-01-01 22:33 ` greened
2013-01-02 2:21 ` Junio C Hamano
2013-01-01 3:57 ` [PATCH 4/8] Fix Synopsis David A. Greene
2013-01-01 21:40 ` Junio C Hamano
2013-01-01 22:35 ` greened
2013-01-01 3:57 ` [PATCH 5/8] Honor DESTDIR David A. Greene
2013-01-01 21:42 ` Junio C Hamano
2013-01-01 22:36 ` greened
2013-01-01 3:57 ` [PATCH 6/8] Make the Manual Directory if Needed David A. Greene
2013-01-01 21:44 ` Junio C Hamano
2013-01-01 22:37 ` greened
2013-01-01 3:57 ` [PATCH 7/8] Ignore git-subtree David A. Greene
2013-01-01 21:44 ` Junio C Hamano
2013-01-01 3:57 ` [PATCH 8/8] Fix Documentation Typo David A. Greene
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=7va9ssa94l.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=greened@obbligato.org \
--cc=techlivezheng@gmail.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).