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

Re: [PATCH 2/4] push: make upstream, simple work with pushdefault

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 10, 2013, 19:09 UTC
Message-ID
<7vobbdhjeg.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CALkWK0mfWs3LBocvn=QMcX0_ZCROx4Nw=+xjpCbKLQU0JzSdXg@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 11 quoted lines
>> I am not saying that you have to pick one to use for push.default
>> among the remaining ones (i.e. matching, current, what else?).  It
>> is very plausible that the triangular workflow wants a different
>> logic to pick what branches are to be updated and how.  Perhaps we
>> would want something that is capable of mapping your local branch
>> name to a branch name suitable in your publishing repository, and I
>> am not opposed to have such a mode.
>
> Okay, we'll have to do some sort of split and mark push.default =
> upstream/ simple suitable-only-for-centralized-workflows, or something
> to that effect (deprecation?) :|

Among the current ones, I think "upstream" is the only one that has the "branch I fetch and integrate with is the one I want to update with my result" connotation. The "current" and "matching" modes determine what gets pushed solely between the local repository you are pushing from and the remote repository you are pushing to, without getting "what do I fetch and integrate with" in the equation.

As an extension to "upstream", the current implementation of "simple" of course has the same issue, but because the name "simple" does not inherently have such "branch I fetch and integrate with is the one I want to update with my result" connotation, we can clean up its semantics to match the new reality after triangular workflow.

If you recall the earlier discussion on "@{publish} which is different from @{upstream}", one idea to allow mapping on the push end was to introduce "push.default = single" that would act as "upstream" when in "branch I fetch and integrate with is the same branch at the same repository the one I want to update with my result" workflow, and in a triangular workflow maps the branch being pushed using remote.$name.push refspecs (if exists).

I think extending it further to act as 'current' if no push refspecs are set for the remote you push to in a triangular workflow might be a way to go if we want the mapping flexibility without having to set branch.$name.push to each and every branch.

Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 10 of 16 in “Fix triangular workflows for upstream, simple”
  1. 0/4 Fix triangular workflows for upstream, simpleRamkumar Ramachandra, Jun 9, 2013
  2. 1/4 t/push-default: remove redundant test_config linesRamkumar Ramachandra, Jun 9, 2013
  3. 2/4 push: make upstream, simple work with pushdefaultRamkumar Ramachandra, Jun 9, 2013
  4. Junio C HamanoJun 9, 2013
  5. Ramkumar RamachandraJun 10, 2013
  6. Junio C HamanoJun 10, 2013
  7. Ramkumar RamachandraJun 10, 2013
  8. Junio C HamanoJun 10, 2013
  9. Ramkumar RamachandraJun 10, 2013
  10. Junio C HamanoJun 10, 2013
  11. Ramkumar RamachandraJun 13, 2013
  12. Junio C HamanoJun 13, 2013
  13. Junio C HamanoJun 13, 2013
  14. Ramkumar RamachandraJun 13, 2013
  15. 3/4 t/push-default: generalize test_push_{success, commit}Ramkumar Ramachandra, Jun 9, 2013
  16. 4/4 t/push-default: test pushdefault with all modesRamkumar Ramachandra, Jun 9, 2013

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.