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

push.default???

From
Paolo Bonzini <bonzini@gnu.org>
Date
Jun 22, 2009, 10:02 UTC
Message-ID
<h1nks1$vdl$1@ger.gmane.org>

Hi all, I just upgraded to git 1.6.3 and found this new little gem called push.default...

Now, having gone through an attempt of proposing a different semantics for "git push", this stroke me as total nonsense, because now we have two totally incompatible ways to specify push refspecs.

A sensible implementation would have been something like 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)
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).
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.
4) in 1.6.4 or 1.7.0, make "git push" fail outright if there is no push 
line, with text suggesting
   For remotes that you will create in the future, please use the
   `--push' argument to `git remote add'.  For existing remotes,
   you can use the following command to obtain the same behavior as
   git 1.6.3:
     git config --add remote.origin.push :
   For alternative configurations, please look at the release notes
   for git 1.6.4.

so that it's a quick cut'n'paste into the shell to fix this (though once per repository).

I know it's my fault that I did not follow the development of git last March, but I could not help ranting that it is extremely wrong to specify what to push without a refspec (in the configuration, not in the command line -- the cmdlines can always have more "porcelain" attached to them).

(1) and (2) in particular can still be straightened, and (4) too maybe. 
  I can work on the implementation if we agree on the details.
Paolo
Next: Junio C Hamano
Message 1 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.