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

Re: [PATCH v2] Remarks that tags need to be pushed explicitly

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 10, 2011, 21:24 UTC
Message-ID
<7vboy5wfao.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20110610203943.GA50937@sherwood.local>
Steffen Daode Nurpmeso <sdaoden@googlemail.com> writes:
> (except for the term "branch-related <refspec>", but "any valid
> <refspec>" is a bit misleading since you will see nowhere that
> "ref/tags/*" is not a valid <refspec> unless you know this is
> a logical thing; heroes may know at a glance).

Sorry, I do not understand this paragraph, nor why the hunk in your patch that corresponds to this comment, is a good change.

The current document says that any valid <refspec> can be configured as the default to push for 'git push backup', so you could say

    [remote "backup"]
	url = /mnt/backup/my-project.git/
    	push = +refs/heads/*:refs/heads/*
        push = +refs/tags/*:refs/tags/*

in your configuration file, and "git push backup" would save the branches and tags to your backup location.

Why should this paragraph discourage users to configure refspec that talk about refs outside branch-related things?

Show 14 quoted lines
> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
> index 88acfcd..e3af6da 100644
> --- a/Documentation/git-push.txt
> +++ b/Documentation/git-push.txt
> ...
> @@ -340,8 +340,8 @@ The default behavior of this command when no <refspec> is given can be
>  configured by setting the `push` option of the remote.
>  +
>  For example, to default to pushing only the current branch to `origin`
> -use `git config remote.origin.push HEAD`.  Any valid <refspec> (like
> -the ones in the examples below) can be configured as the default for
> +use `git config remote.origin.push HEAD`.  Any valid branch-related <refspec>
> +(like the ones in the examples below) can be configured as the default for
>  `git push origin`.
Show 7 quoted lines
> @@ -371,6 +371,10 @@ git push origin HEAD:master::
>  	`origin` repository. This form is convenient to push the current
>  	branch without thinking about its local name.
>  
> +git push origin tag v1.5::
> +	Push the `v1.5` tag to the `origin` repository.
> +	Short hand for `git push origin refs/tags/v1.5:refs/tags/v1.5`.

Existing documentation seems to say either "shorthand" (22 occurrences) or "short-hand" (12 occurrences).

Show 14 quoted lines
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index f13a846..168e530 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -643,9 +643,9 @@ $ git tag stable-1 1b2e1d63ff
>  You can use stable-1 to refer to the commit 1b2e1d63ff.
>  
>  This creates a "lightweight" tag.  If you would also like to include a
> -comment with the tag, and possibly sign it cryptographically, then you
> -should create a tag object instead; see the linkgit:git-tag[1] man page
> -for details.
> +comment with the tag, possibly sign the tag cryptographically, or publish the
> +tag in a shared repository, then you should create a tag object instead; see
> +the linkgit:git-tag[1] man page for details.

Addition of "possibly sign" is a good change, but it is perfectly OK to publish a lightweight tag by pushing it into a remote repository via "git push", so "if you want to publish, you should create a tag object instead" is a misguided suggestion.

Other than that, the patch looks Ok to me.
Thanks.
Previous: Steffen Daode NurpmesoNext: Steffen Daode Nurpmeso
Message 11 of 14 in “Jabber, question on push,pull and --tags, and no help but jabber”
  1. Steffen Daode NurpmesoJun 6, 2011
  2. Michael J GruberJun 6, 2011
  3. Felipe ContrerasJun 6, 2011
  4. Steffen Daode NurpmesoJun 6, 2011
  5. Michael J GruberJun 7, 2011
  6. Steffen Daode NurpmesoJun 7, 2011
  7. Notes that tags need to pushed explicitelySteffen Daode Nurpmeso, Jun 7, 2011
  8. Junio C HamanoJun 7, 2011
  9. Remarks that tags need to be pushed explicitlySteffen Daode Nurpmeso, Jun 7, 2011
  10. Remarks that tags need to be pushed explicitlySteffen Daode Nurpmeso, Jun 10, 2011
  11. Junio C HamanoJun 10, 2011
  12. Steffen Daode NurpmesoJun 11, 2011
  13. Victor EngmarkJun 6, 2011
  14. Junio C HamanoJun 6, 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.