From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Re* How to generate pull-request with info of signed tag
Date: Wed, 21 Dec 2011 12:00:03 +0530 [thread overview]
Message-ID: <87liq6xwr8.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <7vk45smilc.fsf@alter.siamese.dyndns.org>
On Mon, 19 Dec 2011 12:06:55 -0800, Junio C Hamano <gitster@pobox.com> wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> > Come to think of it, the last patch I sent out on request pull was very
> > wrong....
>
> And this should fix it.
>
> -- >8 --
> Subject: [PATCH] request-pull: do not emit "tag" before the tagname
>
> The whole point of the recent update to allow "git pull $url $tagname" is
> so that the integrator does not have to store the (signed) tag that is
> used to convey authenticity to be recorded in the resulting merge in the
> local repository's tag namespace. Asking for a merge be made with "git
> pull $url tag $tagname" defeats it.
>
> Note that the request can become ambiguous if the requestor has a branch
> with the same name as the tag, but that is not a new problem limited to
> pulling. I wouldn't mind if somebody wants to add disambiguation to the
> find_matching_ref logic in the script as a separate patch, though.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> git-request-pull.sh | 4 +---
> t/t5150-request-pull.sh | 2 +-
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/git-request-pull.sh b/git-request-pull.sh
> index 7b5c777..d7ba117 100755
> --- a/git-request-pull.sh
> +++ b/git-request-pull.sh
> @@ -63,10 +63,8 @@ die "fatal: No commits in common between $base and $head"
> find_matching_ref='
> sub abbr {
> my $ref = shift;
> - if ($ref =~ s|refs/heads/||) {
> + if ($ref =~ s|refs/heads/|| || $ref =~ s|refs/tags/||) {
> return $ref;
> - } elsif ($ref =~ s|refs/tags/||) {
> - return "tag $ref";
> } else {
> return $ref;
> }
> diff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh
> index aec842f..da25bc2 100755
> --- a/t/t5150-request-pull.sh
> +++ b/t/t5150-request-pull.sh
> @@ -180,7 +180,7 @@ test_expect_success 'request names an appropriate branch' '
> read branch
> } <digest &&
> {
> - test "$branch" = tag--full ||
> + test "$branch" = full ||
> test "$branch" = master ||
> test "$branch" = for-upstream
> }
Also can we make .git/config remote stanza to have something like below
fetch = +refs/tags/*:refs/tags/abc/*
so that one can do
git fetch t-remote tag-name
and that get stored to abc/tag-name
-aneesh
next prev parent reply other threads:[~2011-12-21 6:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-16 6:35 How to generate pull-request with info of signed tag Aneesh Kumar K.V
2011-12-16 16:22 ` Junio C Hamano
2011-12-16 16:56 ` Re* " Junio C Hamano
2011-12-17 13:27 ` Aneesh Kumar K.V
2011-12-17 19:47 ` Junio C Hamano
2011-12-19 16:10 ` Aneesh Kumar K.V
2011-12-19 19:55 ` Junio C Hamano
2011-12-19 20:06 ` Junio C Hamano
2011-12-21 6:30 ` Aneesh Kumar K.V [this message]
2011-12-21 7:03 ` Junio C Hamano
2011-12-21 16:51 ` Aneesh Kumar K.V
2011-12-21 18:39 ` Junio C Hamano
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=87liq6xwr8.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=git@vger.kernel.org \
--cc=gitster@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.
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).