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

Re: [PATCH v3 2/8] Add concept of 'publish' branch

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 11, 2014, 19:48 UTC
Message-ID
<xmqqr453r6js.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1397239151-2391-3-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 9 quoted lines
> The publish branch is the branch the user wants to push to, akin to the
> upstream branch, which is the branch the user wants to use as a
> baseline. It overrides other configurations, such as push.default, and
> remote.<name>.push.
>
> The upstream branch is:
>
>   branch.$name.remote
>   branch.$name.merge

These two configuration variables are *NOT* the "upstream branch"; it is more like "the upstream branch of $name is _defined_ with these two variables".

For example, with:
	[remote "foo"]
        	fetch = refs/heads/*:refs/remotes/foo/*
	[branch "bar"]
        	remote = foo
                merge = baz

The upstream branch of 'bar' is refs/remotes/foo/baz, and that is determined by consulting these two variables, branch.bar.remote and branch.bar.merge to learn that we look at refs/heads/baz from foo and also refs/remotes/foo/baz is where we keep a copy of that.

> The publish branch is:
>
>   branch.$name.pushremote
>   branch.$name.push

Can you give a description for "the publish branch for $name" here in a way similar to "the upstream" I gave an example above, so that anybody reading this log message can answer questions like...

When the end users say master@{publish}, what conceptually are they naming? Can they use master@{publish} in a way similar to:

 $ git log master@{upstream}..master

that gives us what we did since we forked, because master@{upstream} names the remote-tracking branch we locally have for the branch our 'master' integrates with?

Thanks.
Previous: Felipe ContrerasNext: Felipe Contreras
Message 4 of 11 in “Introduce publish tracking branch”
  1. 0/8 Introduce publish tracking branchFelipe Contreras, Apr 11, 2014
  2. 1/8 t5516 (fetch-push): fix test restorationFelipe Contreras, Apr 11, 2014
  3. 2/8 Add concept of 'publish' branchFelipe Contreras, Apr 11, 2014
  4. Junio C HamanoApr 11, 2014
  5. 3/8 branch: add --set-publish-to optionFelipe Contreras, Apr 11, 2014
  6. 4/8 push: add --set-publish optionFelipe Contreras, Apr 11, 2014
  7. 5/8 branch: display publish branchFelipe Contreras, Apr 11, 2014
  8. 6/8 sha1_name: cleanup interpret_branch_name()Felipe Contreras, Apr 11, 2014
  9. 7/8 sha1_name: simplify track findingFelipe Contreras, Apr 11, 2014
  10. 8/8 sha1_name: add support for @{publish} marksFelipe Contreras, Apr 11, 2014
  11. Matthieu MoyApr 11, 2014

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.