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

Re: [PATCH] grep: --full-tree

From
Uri Okrent <uokrent@gmail.com>
Date
Nov 27, 2009, 16:27 UTC
Message-ID
<6839293b0911270827x54947c64q5f93e37664bc20f3@mail.gmail.com>
In-Reply-To
<alpine.DEB.1.00.0911271144230.4521@intel-tinevez-2-302>

I've been following this thread for a long time and now I feel the need to chime in...

On Fri, Nov 27, 2009 at 2:53 AM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

> And it makes things inconsistent.  That is why I do not use it.

The number one problem my users have with git is inconsistent behavior, both internally to git, and externally with respect to the rest of the OS. But really, the issue is one of managing expectations, which is where we here tend to fall down.

When you name the command grep, whether you like it of not, you've bought into a certain set of expectations from the user who has been using unix's grep since she was a baby. Saying, "well, in git it works this way", (or saying "well in git those path looking things you've been providing to commands are not really paths, so don't expect them to act as such"), would make my users want to vomit all over me, and then, not use git (a shame since it's the best scm system around IMHO).

If we intend the behavior of the command to be materially different from the good old unix standby, then we shouldn't use the same name, and create the expectation that they are getting essentially the same thing (git search, git pickaxe, or something carries no semantic baggage---and no, I'm not suggesting we change the name).

> I, for one, do not like Git's reputation...

There's the rub. How do we achieve consistency without breaking the world? The short answer is, you really can't. As programmers we tend to be a very timid bunch, but sometimes (and David A. can attest to this, at least at dayjob) it's better to just make a change for the better, and just deal with the breakages. It is possible to change behavior (and even break some scripts! I firmly believe it is worthwhile sacrificing some scripts on the altar of consistency).

The key once again, is managing expectations. We can't go around changing everything willy-nilly, and we can't be continually changing things. Here is where we could take a lesson from the python community.

When they decided they needed to change things, they bundled a bunch of backwards incompatible changes together and went for it. Yes, Python 3 will break your scripts, but the most important thing is, everybody knows it.

A similar thing was done here with the huge warning that push spits out, but in the general case I would argue, that the wisest course is to save backwards incompatible changes for a git 2 or something, where we know we're breaking the world, and then scratch all our (well thought out) backwards incompatible itches at once.

Whew. A bit of a rant, but there you go...
-- 
   Uri

Please consider the environment before printing this message.
http://www.panda.org/how_you_can_help/
Previous: Johannes SchindelinNext: Junio C Hamano
Message 25 of 68 in “grep: --full-tree”
  1. grep: --full-treeJunio C Hamano, Nov 24, 2009
  2. Michael J GruberNov 25, 2009
  3. Junio C HamanoNov 25, 2009
  4. Sverre RabbelierNov 25, 2009
  5. Junio C HamanoNov 25, 2009
  6. Sverre RabbelierNov 25, 2009
  7. Junio C HamanoNov 25, 2009
  8. Sverre RabbelierNov 25, 2009
  9. Johannes SchindelinNov 25, 2009
  10. Sverre RabbelierNov 25, 2009
  11. Jeff KingNov 25, 2009
  12. Jeff KingNov 25, 2009
  13. Junio C HamanoNov 25, 2009
  14. Jeff KingNov 25, 2009
  15. Junio C HamanoNov 25, 2009
  16. Jeff KingNov 25, 2009
  17. James PickensNov 25, 2009
  18. Jeff KingNov 25, 2009
  19. James PickensNov 26, 2009
  20. Jeff KingNov 27, 2009
  21. Junio C HamanoNov 27, 2009
  22. Johannes SchindelinNov 27, 2009
  23. Jeff KingNov 27, 2009
  24. Johannes SchindelinNov 27, 2009
  25. Uri OkrentNov 27, 2009
  26. Junio C HamanoNov 27, 2009
  27. Uri OkrentNov 27, 2009
  28. Jeff KingNov 27, 2009
  29. Uri OkrentNov 29, 2009
  30. Felipe ContrerasNov 29, 2009
  31. Jeff KingNov 27, 2009
  32. Johannes SchindelinNov 27, 2009
  33. Jeff KingNov 27, 2009
  34. Johannes SchindelinNov 29, 2009
  35. Jeff KingNov 29, 2009
  36. Junio C HamanoNov 29, 2009
  37. Felipe ContrerasNov 29, 2009
  38. Junio C HamanoNov 27, 2009
  39. Jeff KingNov 27, 2009
  40. Johannes SchindelinNov 29, 2009
  41. Jeff KingNov 29, 2009
  42. Matthieu MoyNov 27, 2009
  43. Johannes SchindelinNov 27, 2009
  44. Wincent ColaiutaNov 25, 2009
  45. Junio C HamanoNov 26, 2009
  46. A Large Angry SCMNov 26, 2009
  47. Junio C HamanoNov 26, 2009
  48. A Large Angry SCMNov 26, 2009
  49. Junio C HamanoNov 26, 2009
  50. James PickensNov 26, 2009
  51. Junio C HamanoNov 25, 2009
  52. Jeff KingNov 25, 2009
  53. A Large Angry SCMNov 25, 2009
  54. Jeff KingNov 25, 2009
  55. A Large Angry SCMNov 25, 2009
  56. Jeff KingNov 25, 2009
  57. Felipe ContrerasNov 29, 2009
  58. Uri OkrentNov 29, 2009
  59. Junio C HamanoNov 26, 2009
  60. Jeff KingNov 27, 2009
  61. A Large Angry SCMNov 25, 2009
  62. Junio C HamanoNov 25, 2009
  63. A Large Angry SCMNov 25, 2009
  64. A Large Angry SCMNov 25, 2009
  65. Johannes SchindelinNov 25, 2009
  66. Junio C HamanoNov 25, 2009
  67. Johannes SchindelinNov 26, 2009
  68. Junio C HamanoNov 26, 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.