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

Re: [PATCH 2/4] add -u: get rid of "treewideupdate" configuration

From
Jeff King <peff@peff.net>
Date
Apr 8, 2011, 17:54 UTC
Message-ID
<20110408175149.GA3917@sigill.intra.peff.net>
In-Reply-To
<1302138996-10006-3-git-send-email-gitster@pobox.com>
On Wed, Apr 06, 2011 at 06:16:34PM -0700, Junio C Hamano wrote:
> Thanks to the magic ":/" pathspec, it is much easier to invoke both
> tree-wide operation and limited-to-cwd operation on demand from the
> command line.

I am mildly negative on this patch. Having the config variable helps two types of users:

  1. Ones who see the warning for new behavior, say "great, I've been
     informed and am ready to use it", and don't want to see the message
     again. They are stuck typing "./" or ":/" every time, or end up
     getting spammed by the migration message.
  2. Users who prefer the current behavior and would rather keep it. We
     give them no out except to type "./" every time. Changing the
     default is one thing; an irate user can see the change and fix it.
     But to give them no way of changing the default back seems
     unnecessarily limiting.
> What remains is the downside of the configuration variable,
> namely, that it makes git behave differently depending on who you are and
> in which repository you are using it, hence making it harder to help
> and/or teach others.

I have never been a fan of this reasoning. Sure, it is slightly harder to help people when the system is configurable. But dropping configurability comes at the cost of people who are using the system day-to-day. And isn't making it pleasant to use every day more important than the minority of times you are telling somebody else how to use it?

Besides which, if you are helping somebody remotely or sitting at an unfamiliar git installation, it still wouldn't be safe to recommend pathspec-less "git add -u" without first checking which version of git the person is running (though to be fair, in 2 or 3 years it will be reasonable to assume a certain behavior, and a config option would still exist).

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 15 of 35 in “Redoing the "add -u" migration plan”
  1. 0/4 Redoing the "add -u" migration planJunio C Hamano, Apr 7, 2011
  2. 1/4 magic pathspec: add tentative ":/path/from/top/level" pathspec supportJunio C Hamano, Apr 7, 2011
  3. Junio C HamanoApr 7, 2011
  4. Nguyen Thai Ngoc DuyApr 7, 2011
  5. Junio C HamanoApr 7, 2011
  6. Nguyen Thai Ngoc DuyApr 8, 2011
  7. Nguyen Thai Ngoc DuyApr 7, 2011
  8. Junio C HamanoApr 7, 2011
  9. Nguyen Thai Ngoc DuyApr 8, 2011
  10. Junio C HamanoApr 8, 2011
  11. Nguyen Thai Ngoc DuyApr 8, 2011
  12. Junio C HamanoApr 8, 2011
  13. Nguyen Thai Ngoc DuyApr 8, 2011
  14. 2/4 add -u: get rid of "treewideupdate" configurationJunio C Hamano, Apr 7, 2011
  15. Jeff KingApr 8, 2011
  16. Junio C HamanoApr 8, 2011
  17. Jeff KingApr 8, 2011
  18. Junio C HamanoApr 8, 2011
  19. Jeff KingApr 8, 2011
  20. Junio C HamanoApr 8, 2011
  21. Junio C HamanoApr 8, 2011
  22. Nguyen Thai Ngoc DuyApr 9, 2011
  23. Junio C HamanoApr 9, 2011
  24. Nguyen Thai Ngoc DuyApr 9, 2011
  25. Junio C HamanoApr 9, 2011
  26. Nguyen Thai Ngoc DuyApr 9, 2011
  27. Junio C HamanoApr 9, 2011
  28. Nguyen Thai Ngoc DuyApr 9, 2011
  29. Nguyen Thai Ngoc DuyApr 9, 2011
  30. Junio C HamanoApr 9, 2011
  31. Nguyen Thai Ngoc DuyMay 3, 2011
  32. Junio C HamanoMay 3, 2011
  33. Nguyen Thai Ngoc DuyMay 3, 2011
  34. 3/4 add: make "add -u/-A" update full tree without pathspec (step 2)Junio C Hamano, Apr 7, 2011
  35. 4/4 add: make "add -u/-A" update full tree without pathspec (step 3)Junio C Hamano, Apr 7, 2011

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.