git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Re* How to generate pull-request with info of signed tag

From
Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Date
Dec 21, 2011, 06:30 UTC
Message-ID
<87liq6xwr8.fsf@linux.vnet.ibm.com>
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:
Show 56 quoted lines
> 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 12 in “How to generate pull-request with info of signed tag”
  1. Aneesh Kumar K.VDec 16, 2011
  2. Junio C HamanoDec 16, 2011
  3. Re* How to generate pull-request with info of signed tagJunio C Hamano, Dec 16, 2011
  4. Aneesh Kumar K.VDec 17, 2011
  5. Junio C HamanoDec 17, 2011
  6. Aneesh Kumar K.VDec 19, 2011
  7. Junio C HamanoDec 19, 2011
  8. Junio C HamanoDec 19, 2011
  9. Aneesh Kumar K.VDec 21, 2011
  10. Junio C HamanoDec 21, 2011
  11. Aneesh Kumar K.VDec 21, 2011
  12. Junio C HamanoDec 21, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.