From: Junio C Hamano <gitster@pobox.com>
To: "David A. Greene" <greened@obbligato.org>
Cc: James Nylen <jnylen@gmail.com>,
git@vger.kernel.org, Techlive Zheng <techlivezheng@gmail.com>,
Wayne Walter <wayne@tickzoom.com>,
"Avery Pennarun \"" <apenwarr@gmail.com>,
Jakub Suder <jakub.suder@gmail.com>, John Yani <vanuan@gmail.com>,
"David A. Greene
<greened@obbligato.org>"@b-sasl-quonix.pobox.com
Subject: Re: [PATCH 12/13] contrib/subtree: Handle '--prefix' argument with a slash appended
Date: Mon, 04 Feb 2013 21:16:33 -0800 [thread overview]
Message-ID: <7vsj5bwdam.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1360037173-23291-13-git-send-email-greened@obbligato.org> (David A. Greene's message of "Mon, 4 Feb 2013 22:06:12 -0600")
"David A. Greene" <greened@obbligato.org> writes:
> From: Techlive Zheng <techlivezheng@gmail.com>
>
> 'git subtree merge' will fail if the argument of '--prefix' has a slash
> appended.
>
> Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
> Signed-off-by: David A. Greene <greened@obbligato.org>
> ---
> contrib/subtree/git-subtree.sh | 2 +-
> contrib/subtree/t/t7900-subtree.sh | 19 +++++++++++++++++++
> 2 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
> index c72af95..0493e47 100755
> --- a/contrib/subtree/git-subtree.sh
> +++ b/contrib/subtree/git-subtree.sh
> @@ -82,7 +82,7 @@ while [ $# -gt 0 ]; do
> --annotate) annotate="$1"; shift ;;
> --no-annotate) annotate= ;;
> -b) branch="$1"; shift ;;
> - -P) prefix="$1"; shift ;;
> + -P) prefix="${1%/}"; shift ;;
While it may not be a bad change per-se, I have to wonder if it is
worth special casing "--prefix=foo/", that should have been spelled
as "--prefix=foo", while still failing misspelling like "--prefix=foo//"
and possibly other forms, perhaps "--prefix=foo//bar/baz"?
next prev parent reply other threads:[~2013-02-05 5:16 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-05 4:06 Assorted contrib/subtree Patches David A. Greene
2013-02-05 4:06 ` [PATCH 01/13] contrib/subtree: Remove Test Number Comments David A. Greene
2013-02-05 4:39 ` Junio C Hamano
2013-02-05 4:06 ` [PATCH 02/13] contrib/subtree: Use %B for Split Subject/Body David A. Greene
2013-02-05 4:06 ` [PATCH 03/13] contrib/subtree: Better Error Handling for add David A. Greene
2013-02-05 4:06 ` [PATCH 04/13] contrib/subtree: Fix Synopsis David A. Greene
2013-02-05 4:06 ` [PATCH 05/13] contrib/subtree: Honor DESTDIR David A. Greene
2013-02-05 4:06 ` [PATCH 06/13] contrib/subtree: Make the Manual Directory if Needed David A. Greene
2013-02-05 4:06 ` [PATCH 07/13] contrib/subtree: Fix whitespaces David A. Greene
2013-02-05 4:42 ` Junio C Hamano
2013-02-05 4:06 ` [PATCH 08/13] contrib/subtree: Add vim modeline David A. Greene
2013-02-05 4:32 ` Junio C Hamano
2013-02-05 4:06 ` [PATCH 09/13] contrib/subtree: Ignore testing directory David A. Greene
2013-02-05 4:36 ` Junio C Hamano
2013-02-05 4:06 ` [PATCH 10/13] contrib/subtree: Code cleaning and refactoring David A. Greene
2013-02-05 5:01 ` Junio C Hamano
2013-02-05 4:06 ` [PATCH 11/13] contrib/subtree: Make each test self-contained David A. Greene
2013-02-05 5:13 ` Junio C Hamano
[not found] ` <87d2wfrnbe.fsf@waller.obbligato.org>
2013-02-05 15:18 ` Junio C Hamano
2013-02-18 18:34 ` greened
2013-02-05 4:06 ` [PATCH 12/13] contrib/subtree: Handle '--prefix' argument with a slash appended David A. Greene
2013-02-05 5:16 ` Junio C Hamano [this message]
2013-02-05 4:06 ` [PATCH 13/13] contrib/subtree: Remove --annotate David A. Greene
2013-02-05 5:17 ` Junio C Hamano
[not found] ` <87pq0frnmb.fsf@waller.obbligato.org>
2013-02-05 13:27 ` James Nylen
2013-02-18 18:39 ` greened
2013-02-18 19:46 ` James Nylen
2013-02-05 9:14 ` Assorted contrib/subtree Patches Jakub Suder
-- strict thread matches above, loose matches on Subject: below --
2013-02-05 11:36 Rebased git-subtree changes David A. Greene
2013-02-05 11:36 ` [PATCH 12/13] contrib/subtree: Handle '--prefix' argument with a slash appended 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=7vsj5bwdam.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc="David A. Greene <greened@obbligato.org>"@b-sasl-quonix.pobox.com \
--cc=apenwarr@gmail.com \
--cc=git@vger.kernel.org \
--cc=greened@obbligato.org \
--cc=jakub.suder@gmail.com \
--cc=jnylen@gmail.com \
--cc=techlivezheng@gmail.com \
--cc=vanuan@gmail.com \
--cc=wayne@tickzoom.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).