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

Re: push.default???

From
Finn Arne Gangstad <finnag@pvv.org>
Date
Jun 23, 2009, 10:34 UTC
Message-ID
<20090623103428.GA4214@pvv.org>
In-Reply-To
<h1nks1$vdl$1@ger.gmane.org>
On Mon, Jun 22, 2009 at 12:02:33PM +0200, Paolo Bonzini wrote:
> Hi all, I just upgraded to git 1.6.3 and found this new little gem  
> called push.default...
> [...]
You should have been here when we discussed this! :)
> 1) Also in 1.6.3, invent a special refspec for "tracking", something  
> like "HEAD>" (of course this is not a special case; "refs/heads/*>"  
> would also work, yadda yadda)

Yes, this is a weakness righ now - the only way to get tracking semantics is to set push.default. I could not find a very good way of specifying this. We currently have the magic refspecs : and HEAD. Adding a ">" to "HEAD>" would be annoying I think, since it has to be quoted in the shell.

Maybe we can use ":" as an escape, it is not allowed in refspecs. Something like "::tracking" (and we cold also have "::matching", "::current" and so on for completeness)

> 2) Also in 1.6.3, add a "--push={current,tracking,matching,mirror}"  
> option to "git remote add" that would set up a push refspec without the  
> need to actually know refspec syntax. (--mirror would become just a  
> synonym for --push=mirror).

Sounds like a good idea, the options would also make sense to push I think, so you can "git push [--current|tracking|...] ".

> 3) Possibly, in 1.6.3 make "git clone" add a "push = :" line for the  
> origin branch.  This was actually suggested in a patch by myself.

This would destroy the intention of my patch, it would render the configuration variable pointless I think (and would also silently push matching).

> 4) in 1.6.4 or 1.7.0, make "git push" fail outright if there is no push  
> line, with text suggesting [...]

Hopefully we can get to this stage, that a unconfigured "git push" gives a small message, indicating how to configure it, and not push anything. Most "oldtimers" should have configured this already, so it should not break many setups.

- Finn Arne
Previous: Paolo BonziniNext: Paolo Bonzini
Message 4 of 18 in “push.default???”
  1. Paolo BonziniJun 22, 2009
  2. Junio C HamanoJun 22, 2009
  3. Paolo BonziniJun 22, 2009
  4. Finn Arne GangstadJun 23, 2009
  5. Paolo BonziniJun 23, 2009
  6. Finn Arne GangstadJun 23, 2009
  7. Andreas EricssonJun 23, 2009
  8. Finn Arne GangstadJun 23, 2009
  9. Andreas EricssonJun 23, 2009
  10. Paolo BonziniJun 23, 2009
  11. Finn Arne GangstadJun 23, 2009
  12. Paolo BonziniJun 23, 2009
  13. Junio C HamanoJun 23, 2009
  14. Junio C HamanoJun 23, 2009
  15. Miles BaderJun 24, 2009
  16. Junio C HamanoJun 24, 2009
  17. Paolo BonziniJun 24, 2009
  18. Finn Arne GangstadJun 24, 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.