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

Re: [PATCH v3] push: Enhance unspecified push default warning

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Nov 7, 2013, 10:52 UTC
Message-ID
<vpqtxfo8ow4.fsf@anie.imag.fr>
In-Reply-To
<20131106234544.GF10302@google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
> 	When push.default is set to 'matching', git will push local branches
> 	to remote branches that already exist with the same (matching) name.
Yes, that's better than the original patch (and remains two lines).
Show 24 quoted lines
>>>>> +   "In Git 2.0 the new push.default of 'simple' will push only the current\n"
>>>>> +   "branch to the same remote branch used by git pull.   A push will\n"
>>>>> +   "only succeed if the remote and local branches have the same name.\n"
>>>
>>> while you can see that it is not telling a lie if you read it twice,
>>> "will only succeed if" feels somewhat roundabout.
>>>
>>> 	... push only the current branch back to the branch of the
>>> 	same name, but only if 'git pull' is set to pull from that
>>> 	branch. Otherwise the push will fail.
>>>
>>> might be an improvement, but I dunno.
>>
>> I do not see much difference actually. I tend to prefer the original
>> version: to me the expected behavior is to make push and pull
>> essentially symetrical, and the fact that it fails if the branch is
>> named differently is a safety feature comming on top of that.
>
> Perhaps:
>
> 	In Git 2.0 (or now, if push.default is set to 'simple'), git will behave
> 	more conservatively by pushing only the current branch to the corresponding
> 	remote branch used by "git pull", and only if the remote and local branches
> 	have the same name.

I prefered the original, as it had two sentences. Reading only the first one gave the important information.

> 	In Git 2.0, git will default to a more conservative 'simple' behavior
> 	that only pushes the current branch.

That's an option too, but I think mentionning "git pull" was a good idea.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Jonathan NiederNext: Junio C Hamano
Message 11 of 20 in “push: Enhance unspecified push default warning”
  1. push: Enhance unspecified push default warningGreg Jacobson, Oct 4, 2013
  2. Greg JacobsonNov 3, 2013
  3. Junio C HamanoNov 4, 2013
  4. Matthieu MoyNov 5, 2013
  5. Matthieu MoyNov 5, 2013
  6. Junio C HamanoNov 6, 2013
  7. Junio C HamanoNov 6, 2013
  8. Junio C HamanoNov 6, 2013
  9. Matthieu MoyNov 6, 2013
  10. Jonathan NiederNov 6, 2013
  11. Matthieu MoyNov 7, 2013
  12. Junio C HamanoNov 7, 2013
  13. Matthieu MoyNov 7, 2013
  14. Junio C HamanoNov 8, 2013
  15. Junio C HamanoNov 8, 2013
  16. Marc BranchaudNov 8, 2013
  17. Junio C HamanoNov 11, 2013
  18. Jonathan NiederNov 11, 2013
  19. Marc BranchaudNov 11, 2013
  20. Matthieu MoyNov 11, 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.