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

[RFD] On deprecating "git-foo" for builtins

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 24, 2008, 03:33 UTC
Message-ID
<7vprnzt7d5.fsf@gitster.siamese.dyndns.org>

People seems to have quite strong negative feelings on the removal of dashed form "git-foo" commands from their $PATH.

We have deprecated the dashed form in early 2006, and announced that 1.6.0 will remove them from $PATH in the 1.5.4 release notes, with instructions on how to update their scripts before 1.6.0 happens. Many people knew about this transition, but they didn't do anything about it. Since 2005, git has matured enough that majority of people are using it without building one themselves, without a chance to even read Release Notes.

The pain was exacerbated partly because we tried to be too nice during the "deprecation" period, not to annoy people and not to break people's scripts.

But that niceness backfired. Many people seem to argue now that we should have annoyed people by throwing loud deprecation notices to stderr when they typed "git-foo", and we should have risked breaking their scripts iff they relied on not seeing anything extra on the stderr.

I am 50% sympathetic to them, while the remainder of me think that they can say that in retrospect only because they didn't actually got annoyed with such extra messages and they did not have to fix their scripts before the actual switch-over happened. If we did go the "annoy them early" route, I am sure they would have complained as loudly.

That's all history now anyway. We should try to do better the next time, which is much more important, and that is the topic of this message.

Now, we haven't set the timeframe yet, but the original plan, advocated by Linus and others, was to eventually stop installing "git-foo" form on the filesystem for builtin commands. If we were to do this, we should plan how the deprecation period for this change should look like. I think the sequence of events would look like this:

 (1) Declare that the dashed form are deprecated even in scripts that use
     "git --exec-path" the way 1.5.4 release notes suggested (it does not
     make sense to say "deprecated only for builtins", as the distinction
     between builtins and others are implementation details) and will be
     removed in 1.7.0;
 (2) Update git.c (the "git" wrapper) so that when the command is invoked
     in "git-foo" form for a builtin, issue messages to the standard error
     stream about the deprecation.  Also, when the wrapper invokes an
     external "git-foo" command, it exports an environment variable (say,
     "GIT_WRAPPER_IS_RUNNING_YOU");
     Update non-builtin commands and scripts to first check the
     environment variable, and otherwise issue the same deprecation
     message, and then unset the environment variable before continuing.
 (3) At 1.7.0, stop installing the hardlinks to builtin commands.
There is one alternative, and one augmentation:
 (A) We do not do anything.
 (B) In addition to the main transition plan, outside git, prepare an
     optional "git-old-style" package that installs many "git-foo"
     wrappers in $PATH (i.e. /usr/bin).  Each of them exec "git foo".
     People who like the dashed form can keep typing "git-foo", even
     though that will cost them two exec()s.

I personally do not mind seeing dozens of git-foo commands in /usr/bin, did not have strong opinion on the transition we just did either way, but:

 * Alternative (A) does not logically make much sense.  Now with 1.6.0,
   people are strongly encouraged to use "git foo" form already.
 * Variant (B) feels quite backwards and I think it will have a negative
   effect on our userbase in the longer term. People who train their
   fingers to say "git-foo" on machines with the "git-old-style" package
   will have hard time adjusting to working on machines without it.
Next: Linus Torvalds
Message 1 of 193 in “[RFD] On deprecating "git-foo" for builtins”
  1. Junio C HamanoAug 24, 2008
  2. Linus TorvaldsAug 24, 2008
  3. Imran M YousufAug 24, 2008
  4. Stefan RichterAug 24, 2008
  5. David WoodhouseAug 25, 2008
  6. Geert UytterhoevenAug 25, 2008
  7. Andi KleenAug 25, 2008
  8. A Large Angry SCMAug 26, 2008
  9. Ben CollinsAug 25, 2008
  10. Felipe ContrerasAug 25, 2008
  11. Johannes SchindelinAug 25, 2008
  12. Junio C HamanoAug 25, 2008
  13. David WoodhouseAug 26, 2008
  14. Jeff KingAug 26, 2008
  15. Kristian HøgsbergAug 26, 2008
  16. David WoodhouseAug 26, 2008
  17. Matthias KestenholzAug 26, 2008
  18. Petr BaudisAug 26, 2008
  19. Andi KleenAug 26, 2008
  20. Jeff KingAug 26, 2008
  21. Linus TorvaldsAug 26, 2008
  22. Andi KleenAug 26, 2008
  23. Ulrich WindlAug 27, 2008
  24. Petr BaudisAug 26, 2008
  25. bash completion: Hide more plumbing commandsPetr Baudis, Aug 26, 2008
  26. Shawn O. PearceAug 26, 2008
  27. Jakub NarebskiAug 26, 2008
  28. Junio C HamanoAug 26, 2008
  29. Shawn O. PearceAug 26, 2008
  30. Daniel BarkalowAug 26, 2008
  31. Shawn O. PearceAug 26, 2008
  32. Daniel BarkalowAug 26, 2008
  33. Petr BaudisSep 3, 2008
  34. Petr BaudisSep 3, 2008
  35. Jakub NarebskiAug 26, 2008
  36. Petr BaudisSep 3, 2008
  37. Junio C HamanoSep 4, 2008
  38. Matthieu MoyAug 26, 2008
  39. Karl HasselströmAug 27, 2008
  40. Shawn O. PearceAug 26, 2008
  41. Jeff KingAug 26, 2008
  42. Nguyen Thai Ngoc DuyAug 26, 2008
  43. Willy TarreauAug 26, 2008
  44. Jeff GarzikAug 27, 2008
  45. Jeff KingAug 27, 2008
  46. Jeff GarzikAug 27, 2008
  47. Jeff KingAug 27, 2008
  48. Matthew WilcoxAug 27, 2008
  49. Adrian BunkAug 27, 2008
  50. Jeff KingAug 27, 2008
  51. Adrian BunkAug 27, 2008
  52. Linus TorvaldsAug 27, 2008
  53. Jeff GarzikAug 27, 2008
  54. Ingo MolnarAug 28, 2008
  55. git-show vs git-log (or: git show vs git log)Dominik Brodowski, Aug 28, 2008
  56. Alex RiesenAug 28, 2008
  57. Mike HommeyAug 28, 2008
  58. Linus TorvaldsAug 27, 2008
  59. Ulrich WindlAug 27, 2008
  60. H. Peter AnvinAug 27, 2008
  61. Matthew WilcoxAug 27, 2008
  62. Perry WagleAug 27, 2008
  63. Jeff KingAug 27, 2008
  64. Perry WagleAug 27, 2008
  65. H. Peter AnvinAug 27, 2008
  66. Steven RostedtAug 27, 2008
  67. Junio C HamanoAug 27, 2008
  68. Perry WagleAug 27, 2008
  69. Perry WagleAug 28, 2008
  70. Petr BaudisAug 28, 2008
  71. Perry WagleAug 28, 2008
  72. David WoodhouseAug 28, 2008
  73. Perry WagleAug 28, 2008
  74. Petr BaudisAug 28, 2008
  75. Linus TorvaldsAug 28, 2008
  76. Perry WagleAug 28, 2008
  77. Teemu LikonenAug 28, 2008
  78. Perry WagleAug 28, 2008
  79. Petr BaudisAug 28, 2008
  80. Perry WagleAug 28, 2008
  81. Jeff KingAug 28, 2008
  82. Perry WagleAug 28, 2008
  83. Petr BaudisAug 28, 2008
  84. Jeff KingAug 28, 2008
  85. Perry WagleAug 28, 2008
  86. Jeff KingAug 28, 2008
  87. Perry WagleAug 28, 2008
  88. Jeff KingAug 28, 2008
  89. Junio C HamanoAug 28, 2008
  90. Perry WagleAug 28, 2008
  91. Petr BaudisAug 28, 2008
  92. git-* in test scripts (was On deprecating "git-foo" for builtins)Jeff King, Aug 28, 2008
  93. Junio C HamanoAug 29, 2008
  94. Jeff KingAug 29, 2008
  95. Andreas EricssonAug 29, 2008
  96. Matthieu MoyAug 29, 2008
  97. Andreas EricssonAug 29, 2008
  98. Matthias KestenholzAug 29, 2008
  99. Matthieu MoyAug 29, 2008
  100. Perry WagleAug 28, 2008
  101. Aidan Van DykAug 29, 2008
  102. Felipe ContrerasAug 29, 2008
  103. Aidan Van DykAug 29, 2008
  104. Felipe ContrerasAug 29, 2008
  105. Aidan Van DykAug 29, 2008
  106. Andreas EricssonAug 30, 2008
  107. Jakub NarebskiAug 28, 2008
  108. Wincent ColaiutaAug 29, 2008
  109. Steven RostedtAug 30, 2008
  110. Teemu LikonenAug 30, 2008
  111. Steven RostedtAug 30, 2008
  112. Jeff KingAug 26, 2008
  113. Teemu LikonenAug 26, 2008
  114. Kristian HøgsbergAug 26, 2008
  115. Jean DelvareAug 26, 2008
  116. Takashi IwaiAug 26, 2008
  117. Jean DelvareAug 26, 2008
  118. Andreas EricssonAug 27, 2008
  119. Jean DelvareAug 27, 2008
  120. Geert UytterhoevenAug 27, 2008
  121. H. Peter AnvinAug 26, 2008
  122. Jean DelvareAug 27, 2008
  123. Andreas EricssonAug 27, 2008
  124. Linus TorvaldsAug 26, 2008
  125. Bruce StephensAug 26, 2008
  126. Petr BaudisAug 26, 2008
  127. Bruce StephensAug 26, 2008
  128. Johannes SchindelinAug 28, 2008
  129. Takashi IwaiAug 26, 2008
  130. Dominik BrodowskiAug 26, 2008
  131. Linus TorvaldsAug 26, 2008
  132. Al ViroAug 26, 2008
  133. Linus TorvaldsAug 26, 2008
  134. Al ViroAug 26, 2008
  135. Teemu LikonenAug 26, 2008
  136. Johannes SchindelinAug 28, 2008
  137. Dominik BrodowskiAug 26, 2008
  138. Junio C HamanoAug 26, 2008
  139. Linus TorvaldsAug 26, 2008
  140. Perry WagleAug 26, 2008
  141. Steven RostedtAug 27, 2008
  142. Russell KingAug 27, 2008
  143. Stefan RichterAug 27, 2008
  144. Russell KingAug 28, 2008
  145. Junio C HamanoAug 28, 2008
  146. Matthew WilcoxAug 28, 2008
  147. Petr BaudisAug 28, 2008
  148. Stefan RichterAug 28, 2008
  149. Perry WagleAug 28, 2008
  150. Steven RostedtAug 28, 2008
  151. A Large Angry SCMAug 27, 2008
  152. Krzysztof HalasaAug 27, 2008
  153. Junio C HamanoAug 26, 2008
  154. Jeff KingAug 26, 2008
  155. Jay SoffianAug 27, 2008
  156. H. Peter AnvinAug 27, 2008
  157. Perry WagleAug 26, 2008
  158. Nicolas PitreAug 26, 2008
  159. Johannes SchindelinAug 28, 2008
  160. Matthew WilcoxAug 27, 2008
  161. Russell KingAug 27, 2008
  162. Johannes SchindelinAug 28, 2008
  163. Matthew WilcoxAug 28, 2008
  164. Johannes SchindelinAug 28, 2008
  165. Matthew WilcoxAug 28, 2008
  166. Junio C HamanoAug 27, 2008
  167. Felipe ContrerasAug 28, 2008
  168. Jeff GarzikAug 28, 2008
  169. David WoodhouseAug 28, 2008
  170. Junio C HamanoAug 28, 2008
  171. David WoodhouseAug 28, 2008
  172. Felipe ContrerasAug 28, 2008
  173. Al ViroAug 28, 2008
  174. Felipe ContrerasAug 28, 2008
  175. Felipe ContrerasAug 28, 2008
  176. Paolo CiarrocchiAug 28, 2008
  177. Linus TorvaldsAug 28, 2008
  178. Perry WagleAug 28, 2008
  179. Jakub NarebskiAug 28, 2008
  180. Perry WagleAug 28, 2008
  181. Jeff KingAug 28, 2008
  182. Perry WagleAug 28, 2008
  183. Felipe ContrerasAug 29, 2008
  184. Nicolas PitreAug 28, 2008
  185. Nicolas PitreAug 28, 2008
  186. Linus TorvaldsAug 28, 2008
  187. A Large Angry SCMAug 26, 2008
  188. Jean DelvareAug 26, 2008
  189. A Large Angry SCMAug 26, 2008
  190. Stefan RichterAug 26, 2008
  191. Steven RostedtAug 26, 2008
  192. Shawn O. PearceAug 26, 2008
  193. Jeff KingAug 26, 2008

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.