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

Re: [PATCH 2/2] push: Add '--current', which pushes only the current branch

From
Andreas Ericsson <ae@op5.se>
Date
Nov 19, 2007, 09:24 UTC
Message-ID
<4741565E.1020500@op5.se>
In-Reply-To
<EA5C3227-12E1-43C4-96E8-43BABF26792B@zib.de>
Steffen Prohaska wrote:
Show 43 quoted lines
> 
> On Nov 19, 2007, at 2:28 AM, Junio C Hamano wrote:
> 
> 
> 
>> I do not think it is "Often you want" that makes it awkward.
>>
>> Instead, the awkward case is if you do the "only the current"
>> push NOT often enough.  If it is often enough, you set the
>> configuration once and the awkwardness is behind you.
>>
>> If however it is not often enough, you cannot afford to have the
>> configuration above, because that would force you to tell from
>> the command line which branches, not just the current one, to
>> push, and that is inconvenient because it is not rare enough.
> 
> Will try to rephrase the commit message.
> 
> 
>> Together with your [PATCH 1/2], I like the general direction
>> these patckes are taking us, but it feels a bit too hasty.  I
>> personally am not convinced that switching to --current for
>> everybody is a good move.
>>
>>> ...
>>> Maybe in two years (that's twice an eternity in git time scales):
>>>
>>> 4) make "git push --current" the default.
>>
>> If these, both the uncertainly expressed by "Maybe" and "twice
>> an eternity" are true, which they are, the new warning in the
>> current patch are inappropriate.  Many people's settings depend
>> on a working "push the matching refs" behaviour, and we need a
>> very good excuse to annoy the existing happy users with such a
>> warning.
> 
> I think 3) is the interesting case.  "git push" should do
> nothing by default.  Either you can configure "git push" to do
> something by setting a remote.$remote.push line or you need
> to provide a command line switch.  But if you do not tell
> explicitly what you want, "git push" will not do anything
> for you.
> 

I'd really, really hate that. I often have changes on several branches when I push. I like the behaviour as it is today.

Show 41 quoted lines
> 
>> Remember, how much vocal the dissenters might have been on the
>> list in the recent discussions, we need to consider the needs of
>> the silent majority that has been content with the current
>> behaviour for a long time.
>>
>> The "warning" to annoy them may be a way to get their attention
>> and get them involved in a discussion to decide what the default
>> should be.  But changing the default without giving the people
>> who do not like the _new_ default a way to avoid inconvenience
>> of always typing --matching or --current is not nice.  And
>> honestly, I do not think there is one single default that is
>> good for everybody.
> 
> Personally, I'd switch to the do-nothing default immediately.
> But you are right.  More work is needed to have a smooth transition.
> 
> 
>> We should be doing better.
>>
>> A smoother transition route would be:
>>
>>  - Keep "matching" the built-in default for now;
>>
>>  - Take your patches (but drop "warning" bits at this point) to
>>    introduce 'matching' and 'current' behaviours, and a way to
>>    override the built-in default from the command line;
>>
>>  - Introduce a configuration 'push.defaultRefs' ('matching' or
>>    'current') to override that built-in default, so people who
>>    prefer 'current' can override the built-in default, without
>>    having to type --current every time.
> 
> Sounds like a plan.
> 
> If we have the configuration variable, maybe we could switch
> off the default behaviour immediately.  Setting a single global
> config variable once would be sufficient to get it back.  So,
> we could change the default and print a recommendation to run
> 'git config --global push.defaultRefs matching' to get it back.
> 

Ugh. People who neither know nor care about git development will wonder why the hell they now have to tell git something in order for it to do something it's always done anyway. The majority of git users never read release-notes. They just do "yum update" and then go about their business the same way they've always done.

Newcomers that obviously have no such configuration will wonder why they're getting warnings from using the standard command-set.

Show 16 quoted lines
> ...
> 
>> After all that happens, we can start discussing what the
>> built-in default should be.  When it is changed after the
>> discussion concludes (which may never happen), people who want
>> to keep 'matching' behaviour would have had the configuration
>> mechanism to override that built-in default for some time during
>> the discussion period.  So the beginning of that discussion
>> period is when we should start talking about "We might change
>> the default soon; set the configuration to your liking if you do
>> not want to get affected" in the warning.
> 
> ... And we'd not even start the discussion.  Because there's no
> need to.  Every user should make a choice, once.  We do not
> provide a default (which obviously will trigger another discussion ;)
> 

If the default's to be changed, making it default to no-op is really the only sensible thing to do. Otherwise I'm guessing a lot of people that actually count on the current behaviour will get quite vexed, and --current is definitely not the universally correct default thing to do.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Jakub NarebskiNext: Björn Steinbrink
Message 79 of 168 in “What's cooking in git/spearce.git (topics)”
  1. Shawn O. PearceOct 22, 2007
  2. Jeff KingOct 22, 2007
  3. Jeff KingOct 22, 2007
  4. Linus TorvaldsOct 23, 2007
  5. Jeff KingOct 23, 2007
  6. Pierre HabouzitOct 22, 2007
  7. Steffen ProhaskaOct 22, 2007
  8. Junio C HamanoOct 23, 2007
  9. Shawn O. PearceOct 23, 2007
  10. What's cooking in git.git (topics)Junio C Hamano, Oct 24, 2007
  11. David SymondsOct 24, 2007
  12. Scott ParishOct 24, 2007
  13. Andreas EricssonOct 24, 2007
  14. Scott ParishOct 25, 2007
  15. What's cooking in git.git (topics)Junio C Hamano, Nov 1, 2007
  16. Jakub NarebskiNov 1, 2007
  17. Junio C HamanoNov 1, 2007
  18. Linus TorvaldsNov 1, 2007
  19. Geert BoschNov 1, 2007
  20. Junio C HamanoNov 1, 2007
  21. Mike HommeyNov 1, 2007
  22. Junio C HamanoNov 1, 2007
  23. Junio C HamanoNov 2, 2007
  24. Pierre HabouzitNov 1, 2007
  25. Geert BoschNov 1, 2007
  26. Jonas FonsecaNov 2, 2007
  27. Theodore TsoNov 1, 2007
  28. Melchior FRANZNov 1, 2007
  29. Johan HerlandNov 1, 2007
  30. Junio C HamanoNov 1, 2007
  31. Linus TorvaldsNov 1, 2007
  32. Bill LearNov 1, 2007
  33. Junio C HamanoNov 1, 2007
  34. Petr BaudisNov 2, 2007
  35. Pierre HabouzitNov 1, 2007
  36. Andreas EricssonNov 2, 2007
  37. Pierre HabouzitNov 1, 2007
  38. Jakub NarebskiNov 2, 2007
  39. Petr BaudisNov 2, 2007
  40. Jakub NarebskiNov 2, 2007
  41. Jakub NarebskiNov 2, 2007
  42. Pierre HabouzitNov 2, 2007
  43. Miles BaderNov 2, 2007
  44. Miles BaderNov 2, 2007
  45. Andreas EricssonNov 2, 2007
  46. Johannes SchindelinNov 2, 2007
  47. Brian DowningNov 1, 2007
  48. Pierre HabouzitNov 1, 2007
  49. Wincent ColaiutaNov 2, 2007
  50. What's cooking in git.git (topics)Junio C Hamano, Nov 4, 2007
  51. Jakub NarebskiNov 4, 2007
  52. Pierre HabouzitNov 4, 2007
  53. What's cooking in git.git (topics)Junio C Hamano, Nov 8, 2007
  54. Steffen ProhaskaNov 8, 2007
  55. What's cooking in git.git (topics)Junio C Hamano, Nov 12, 2007
  56. Johannes SchindelinNov 12, 2007
  57. Pierre HabouzitNov 12, 2007
  58. Johannes SchindelinNov 12, 2007
  59. rebase: brown paper bag fix after the detached HEAD patchJohannes Schindelin, Nov 12, 2007
  60. Pierre HabouzitNov 12, 2007
  61. Steffen ProhaskaNov 12, 2007
  62. Johannes SchindelinNov 12, 2007
  63. 1/2 push: Add '--matching' option and print warning if it should be usedSteffen Prohaska, Nov 18, 2007
  64. 2/2 push: Add '--current', which pushes only the current branchSteffen Prohaska, Nov 18, 2007
  65. Junio C HamanoNov 19, 2007
  66. Steffen ProhaskaNov 19, 2007
  67. Junio C HamanoNov 19, 2007
  68. Junio C HamanoNov 19, 2007
  69. Andreas EricssonNov 19, 2007
  70. Steffen ProhaskaNov 19, 2007
  71. Junio C HamanoNov 19, 2007
  72. Steffen ProhaskaNov 19, 2007
  73. push: Add "--current", which pushes only the current branchSteffen Prohaska, Nov 19, 2007
  74. Jakub NarebskiNov 19, 2007
  75. Junio C HamanoNov 19, 2007
  76. Jakub NarebskiNov 19, 2007
  77. Junio C HamanoNov 19, 2007
  78. Jakub NarebskiNov 19, 2007
  79. Andreas EricssonNov 19, 2007
  80. git-commit: Add tests for invalid usage of -a/--interactive with pathsBjörn Steinbrink, Nov 12, 2007
  81. What's cooking in git.git (topics)Junio C Hamano, Nov 15, 2007
  82. Johannes SchindelinNov 15, 2007
  83. t7501-commit: Add test for git commit <file> with dirty index.Kristian Høgsberg, Nov 15, 2007
  84. Johannes SchindelinNov 15, 2007
  85. builtin-commit: fix "git add x y && git commit y" committing x, tooJohannes Schindelin, Nov 15, 2007
  86. Johannes SchindelinNov 15, 2007
  87. Kristian HøgsbergNov 15, 2007
  88. Johannes SchindelinNov 16, 2007
  89. Junio C HamanoNov 17, 2007
  90. Junio C HamanoNov 18, 2007
  91. Jeff KingNov 17, 2007
  92. What's cooking in git.git (topics)Junio C Hamano, Nov 17, 2007
  93. Alex RiesenNov 17, 2007
  94. Junio C HamanoNov 18, 2007
  95. What's cooking in git.git (topics)Junio C Hamano, Nov 21, 2007
  96. What's cooking in git.git (topics)Junio C Hamano, Nov 23, 2007
  97. Jeff KingNov 23, 2007
  98. Johannes SchindelinNov 23, 2007
  99. Jeff KingNov 24, 2007
  100. Nicolas PitreNov 24, 2007
  101. Junio C HamanoNov 24, 2007
  102. J. Bruce FieldsNov 25, 2007
  103. Junio C HamanoNov 25, 2007
  104. J. Bruce FieldsNov 25, 2007
  105. Nicolas PitreNov 26, 2007
  106. J. Bruce FieldsNov 26, 2007
  107. Nicolas PitreNov 26, 2007
  108. J. Bruce FieldsNov 26, 2007
  109. Jakub NarebskiNov 26, 2007
  110. Andreas EricssonNov 26, 2007
  111. Nicolas PitreNov 26, 2007
  112. David KastrupNov 26, 2007
  113. Nicolas PitreNov 26, 2007
  114. Junio C HamanoNov 26, 2007
  115. David KastrupNov 26, 2007
  116. Nicolas PitreNov 26, 2007
  117. David KastrupNov 26, 2007
  118. Nicolas PitreNov 26, 2007
  119. David KastrupNov 26, 2007
  120. Nicolas PitreNov 26, 2007
  121. David KastrupNov 26, 2007
  122. Nicolas PitreNov 27, 2007
  123. Miles BaderDec 5, 2007
  124. Jakub NarebskiNov 26, 2007
  125. Johannes SchindelinNov 26, 2007
  126. Nicolas PitreNov 26, 2007
  127. Jan HudecNov 26, 2007
  128. What's cooking in git.git (topics)Junio C Hamano, Nov 25, 2007
  129. Jakub NarebskiNov 25, 2007
  130. J. Bruce FieldsNov 25, 2007
  131. What's cooking in git.git (topics)Junio C Hamano, Dec 1, 2007
  132. Eric WongDec 1, 2007
  133. Add 'git fast-export', the sister of 'git fast-import'Johannes Schindelin, Dec 2, 2007
  134. Johannes SchindelinDec 2, 2007
  135. What's cooking in git.git (topics)Junio C Hamano, Dec 4, 2007
  136. Johannes SixtDec 4, 2007
  137. msysGit on FAT32 (was: What's cooking in git.git (topics))Jakub Narebski, Dec 4, 2007
  138. Johannes SchindelinDec 4, 2007
  139. Johannes SixtDec 4, 2007
  140. Johannes SchindelinDec 4, 2007
  141. Steffen ProhaskaDec 4, 2007
  142. What's cooking in git.git (topics)Junio C Hamano, Dec 5, 2007
  143. Jakub NarebskiDec 5, 2007
  144. Jakub NarebskiDec 5, 2007
  145. Jeff KingDec 6, 2007
  146. Soft aliases: add "less" and minimal documentationJohannes Schindelin, Dec 5, 2007
  147. Junio C HamanoDec 5, 2007
  148. Jeff KingDec 6, 2007
  149. Jeff KingDec 6, 2007
  150. What's cooking in git.git (topics)Junio C Hamano, Dec 7, 2007
  151. Jakub NarebskiDec 7, 2007
  152. Junio C HamanoDec 7, 2007
  153. Miklos VajnaDec 7, 2007
  154. What's cooking in git.git (topics)Junio C Hamano, Dec 9, 2007
  155. What's cooking in git.git (topics)Junio C Hamano, Dec 13, 2007
  156. Nicolas PitreDec 13, 2007
  157. 1/2 xdl_diff: identify call sites.Junio C Hamano, Dec 13, 2007
  158. Junio C HamanoDec 14, 2007
  159. 2/2 xdi_diff: trim common trailing linesJunio C Hamano, Dec 13, 2007
  160. Peter BaumannDec 14, 2007
  161. Junio C HamanoDec 14, 2007
  162. What's cooking in git.git (topics)Junio C Hamano, Dec 17, 2007
  163. What's cooking in git.git (topics)Junio C Hamano, Dec 23, 2007
  164. checkout --push/--pop idea (Re: What's cooking in git.git (topics))Jan Hudec, Dec 31, 2007
  165. What's cooking in git.git (topics)Junio C Hamano, Jan 5, 2008
  166. Johannes SchindelinJan 5, 2008
  167. What will be cooking in git.git post 1.5.4 (topics)Junio C Hamano, Jan 22, 2008
  168. Brian DowningDec 4, 2007

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.