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

Re: Using push.default with push.remote.push

From
RDRobert Dailey <rcdailey.lists@gmail.com>
Date
Mar 11, 2020, 16:56 UTC
Message-ID
<CAHd499AGQ5k7ON+YY84b6LY1sh9MOw8fsrE2shOibujX1iKeiQ@mail.gmail.com>
In-Reply-To
<20200311162517.GA27893@coredump.intra.peff.net>
On Wed, Mar 11, 2020 at 11:25 AM Jeff King <peff@peff.net> wrote:
Show 9 quoted lines
> > The current behavior seems to be working as designed, but not as
> > desired. The first push command pushes *all* branches under
> > `refs/heads/*`, instead of just the current branch as it normally
> > would via `push.default` setting. It sort of feels like if a resolved,
> > explicitly defined `push.<remote>.push` config is found *and* it
> > includes wildcards, the `push.default` setting should still be
> > respected.
>
> Then when would remote.*.push with a wildcard ever do anything?

Maybe this is where a potential disconnect is, but I've always viewed the wildcard refspec as a mapping, rather than an all-inclusive "Push all the things". In other words, I view it as more of a structural guide than a behavioral one. I recognize I probably have this wrong, but it probably speaks to how some users view it, or at least, some valid use cases to have more of a structural mechanism to map branches to remote repositories, with `git push --all` being a supplement to say "Push all branches using this mapping".

Previous: Jeff KingNext: Robert Dailey
Message 4 of 6 in “Using push.default with push.remote.push”
  1. Robert DaileyMar 11, 2020
  2. Robert DaileyMar 11, 2020
  3. Jeff KingMar 11, 2020
  4. Robert DaileyMar 11, 2020
  5. Robert DaileyMar 11, 2020
  6. Jeff KingMar 11, 2020

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.