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

Re: [PATCH 3/4] Documentation: mention branches rather than heads

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 19, 2009, 03:46 UTC
Message-ID
<7vhc3wrm9x.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1232289418-25627-4-git-send-email-mail@cup.kalibalik.dk>
Anders Melchiorsen <mail@cup.kalibalik.dk> writes:
> Most of the git push page talks about branches, so make it consistent
> also in this paragraph.
Show 20 quoted lines
> Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk>
> ---
>  Documentation/git-push.txt |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
> index 6d3c711..a7a6f4c 100644
> --- a/Documentation/git-push.txt
> +++ b/Documentation/git-push.txt
> @@ -57,8 +57,8 @@ Pushing an empty <src> allows you to delete the <dst> ref from
>  the remote repository.
>  +
>  The special refspec `:` (or `+:` to allow non-fast forward updates)
> -directs git to push "matching" heads: for every head that exists on
> -the local side, the remote side is updated if a head of the same name
> +directs git to push "matching" branches: for every branch that exists on
> +the local side, the remote side is updated if a branch of the same name
>  already exists on the remote side.  This is the default operation mode
>  if no explicit refspec is found (that is neither on the command line
>  nor in any Push line of the corresponding remotes file---see below).

Consistency is good, and I agree "head" may be suboptimal here as this part tries to give formal semantics to what various refspecs do.

I first thought it would make more sense to say "ref" instead, just like the previous paragraph that talks about :<dst> form explains it is a way to remove a "ref". But we do only matching branches with : syntax these days since 098e711 ("git-push $URL" without refspecs pushes only matching branches, 2007-07-01); I agree with the updated text for that reason, but I think the commit log message is wrong.

Thanks.
Previous: Anders Melchiorsen
Message 6 of 6 in “Clarifying the refspec documentation”
  1. 0/4 Clarifying the refspec documentationAnders Melchiorsen, Jan 18, 2009
  2. 1/4 Documentation: git push repository can also be a remoteAnders Melchiorsen, Jan 18, 2009
  3. 2/4 Documentation: remove a redundant elaborationAnders Melchiorsen, Jan 18, 2009
  4. 3/4 Documentation: mention branches rather than headsAnders Melchiorsen, Jan 18, 2009
  5. 4/4 Documentation: avoid using undefined parametersAnders Melchiorsen, Jan 18, 2009
  6. Junio C HamanoJan 19, 2009

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.