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, 22:32 UTC
Message-ID
<20110408223206.GA7343@sigill.intra.peff.net>
In-Reply-To
<7vmxk01izn.fsf@alter.siamese.dyndns.org>
On Fri, Apr 08, 2011 at 03:22:20PM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> So let's step back a bit.
> 
> How about we'd just add ':/' to make it equally easy to switch between
> "local only" vs "tree-wide" in 1.7.6 release, and be done with it.  We
> don't change the default for any of the commands at all.

Yeah, I am beginning to think that is a sensible route. And it commits us to nothing, so if we decide much later that a change of default is sensible, that is still open to us.

Show 7 quoted lines
> Since more than a year ago, I've been saying that the ideal is to make the
> default not matter:
> 
>   http://thread.gmane.org/gmane.comp.version-control.git/133570/focus=133683
> 
> If the default does not matter, why change it?  It just causes us more
> headaches for dubious gain, no?

I'm not sure how much you can achieve the "make it not matter". The shorthands go a long way, but I still want git to read my mind about which I wanted to use (and the closest approximation of that, from my experience, would be a per-repo variable). However, having the shorthands mean that we can try them out in the real world and revisit the topic in a year if people still care.

Show 11 quoted lines
> IIRC, I think the two reasons why we started discussing of "add -u" and
> friends were that (1) some commands default to whole-tree while others
> limit to $cwd --- inconsistency is bad; and (2) when the user wants to do
> a full tree "add -u", there is no way other than counting the current
> depth and typing "../" that many times.
> 
> But when we looked at the current set of commands that limit them to the $cwd,
> we found that "add -u" was the only one that may make sense to switch the
> default, meaning that the "consistency" was not something we would even
> want to shoot for.  For example, we want our "git grep -e pattern" to
> mimic "grep -r -e pattern .".

I am not sure of that. I thought there was interest in full-tree grep (OK, _I_ had some interst in it). But the same transition pain arguments apply there, and we should be able to do "git grep pattern :/" soon, right?

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 19 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.