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

Re: [PATCH] Amend git-push refspec documentation

From
Sam Vilain <sam.vilain@catalyst.net.nz>
Date
Apr 22, 2008, 08:27 UTC
Message-ID
<480DA161.3070107@catalyst.net.nz>
In-Reply-To
<7vk5iq5tj2.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 11 quoted lines
>> -The <src> side can be an
>> -arbitrary "SHA1 expression" that can be used as an
>> -argument to `git-cat-file -t`.  E.g. `master~4` (push
>> -four parents before the current master head).
>> +The <src> side represents the source branch (or arbitrary
>> +"SHA1 expression"; see linkgit:git-rev-parse[1]) that you want to
>> +push.  The <dst> side represents the destination location.
>>  +
> 
> Hmm.  We lost an example but refer to a more authoritative information,
> which is probably Ok.

Well, the example I think was quite confusing to people who have never seen `master~4` before.

Show 14 quoted lines
>> @@ -179,9 +180,10 @@ git push origin master:satellite/master::
>>  
>>  git push origin master:refs/heads/experimental::
>>  	Create the branch `experimental` in the `origin` repository
>> -	by copying the current `master` branch.  This form is usually
>> -	needed to create a new branch in the remote repository as
>> -	there is no `experimental` branch to match.
>> +	by copying the current `master` branch.  This form is only
>> +	needed to create a new branch in the remote repository when
>> +	the local name and the remote name are different; otherwise,
>> +	the branch name on its own will work.
> 
> Note that writing "refs/tags/xprm" instead would allow you to create a
> lightweight tag over there.

True. You could probably replace 'branch' with 'ref' in the two places it occurs in the last sentence to encompass that meaning, too.

Cheers, Sam.

Previous: Junio C Hamano
Message 3 of 3 in “Amend git-push refspec documentation”
  1. Amend git-push refspec documentationSam Vilain, Apr 21, 2008
  2. Junio C HamanoApr 22, 2008
  3. Sam VilainApr 22, 2008

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.