From: Junio C Hamano <gitster@pobox.com>
To: Stefan Naewe <stefan.naewe@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] fix git-parse-remote.sh for remotes that contain slashes
Date: Fri, 14 Jan 2011 11:55:20 -0800 [thread overview]
Message-ID: <7vd3nzntuf.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1295005000-11562-1-git-send-email-stefan.naewe@gmail.com> (Stefan Naewe's message of "Fri\, 14 Jan 2011 12\:36\:40 +0100")
Stefan Naewe <stefan.naewe@gmail.com> writes:
> Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
> ---
Thanks, but no explanation?
Imagine somebody who weren't reading this thread (especially the article
you responded to with this patch) sees this in "git log" output stream.
For that matter, imagine yourself doing that in 2012 when the motivation
of this change you all forgot already.
Do you think it is obvious what the problem the patch tried to fix was?
I don't. "fix" on the subject line gives you 0-bit information for that
purpose.
> diff --git a/git-parse-remote.sh b/git-parse-remote.sh
> index 5f47b18..7cf204e 100644
> --- a/git-parse-remote.sh
> +++ b/git-parse-remote.sh
> @@ -7,8 +7,12 @@ GIT_DIR=$(git rev-parse -q --git-dir) || :;
> get_data_source () {
> case "$1" in
> */*)
> - echo ''
> - ;;
> + if test "$(git config --get "remote.$1.url")"
> + then
> + echo config
> + else
> + echo ''
> + fi ;;
I suspect that making this case arm trigger not on */* but only on /* and
../* would be a lot more sensible solution. Otherwise you would still
have the same issue in repositories that use remotes/ and branches/
mechanism.
git-parse-remote.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index 1cc2ba6..8ec33e3 100644
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -6,7 +6,7 @@ GIT_DIR=$(git rev-parse -q --git-dir) || :;
get_data_source () {
case "$1" in
- */*)
+ ../* | /*)
echo ''
;;
.)
next prev parent reply other threads:[~2011-01-14 19:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-14 9:06 bug: request-pull broken when remote name contains a slash Uwe Kleine-König
2011-01-14 11:36 ` [PATCH] fix git-parse-remote.sh for remotes that contain slashes Stefan Naewe
2011-01-14 19:55 ` Junio C Hamano [this message]
2011-02-28 9:36 ` [PATCH] get_remote_url(): use the same data source as ls-remote to get remote urls Uwe Kleine-König
2011-02-28 23:38 ` Junio C Hamano
2011-03-01 8:41 ` Uwe Kleine-König
2011-03-01 9:21 ` [PATCH 1/2] " Uwe Kleine-König
2011-03-01 9:21 ` [PATCH 2/2] git-request-pull: open-code the only invocation of get_remote_url Uwe Kleine-König
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=7vd3nzntuf.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=stefan.naewe@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).