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

Re: [PATCH 1.8.0] add: make "add -u" update full tree without pathspec

From
Miles Bader <miles@gnu.org>
Date
Feb 7, 2011, 06:26 UTC
Message-ID
<buo8vxsfjib.fsf@dhlpc061.dev.necel.com>
In-Reply-To
<AANLkTimG6s5vSCnisJCt-EXkcJGXfY4Y3WtdB_netU08@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
Show 7 quoted lines
> git log -p and diff family all can take pathspecs. All default to
> tree-wide without pathspecs. This is what I'm doing all the time:
>
> git diff
> # checking, ok, looks good
> git add -u
> # ack, need to come to root dir first

Not to mention "git status", which shows everything in the tree when given no args, but will only show changes underneath the cwd if given "." as an argument.

I agree that the "default to root of git dir when given no args" behavior seems both more convenient -- it's annoying to specify the root of the tree explicitly, but very easy to specify the cwd explicitly (".") -- and more intuitive -- If I want "everything underneath cwd", I'll naturually specify "." as an argument; if I give no args, I almost certainly want the whole tree, no matter where I happen to be in it.

-Miles
-- 
Christian, n. One who follows the teachings of Christ so long as they are not
inconsistent with a life of sin.
Previous: Nguyen Thai Ngoc DuyNext: Joshua Juran
Message 4 of 25 in “add: make "add -u" update full tree without pathspec”
  1. add: make "add -u" update full tree without pathspecNguyễn Thái Ngọc Duy, Feb 7, 2011
  2. Junio C HamanoFeb 7, 2011
  3. Nguyen Thai Ngoc DuyFeb 7, 2011
  4. Miles BaderFeb 7, 2011
  5. Joshua JuranFeb 9, 2011
  6. Matthieu MoyFeb 7, 2011
  7. Junio C HamanoFeb 27, 2011
  8. Matthieu MoyFeb 27, 2011
  9. Nguyen Thai Ngoc DuyFeb 27, 2011
  10. Sverre RabbelierFeb 27, 2011
  11. Nguyen Thai Ngoc DuyFeb 27, 2011
  12. Nguyen Thai Ngoc DuyFeb 27, 2011
  13. Junio C HamanoFeb 27, 2011
  14. Nguyen Thai Ngoc DuyFeb 28, 2011
  15. Junio C HamanoFeb 28, 2011
  16. Nguyen Thai Ngoc DuyMar 1, 2011
  17. Junio C HamanoMar 1, 2011
  18. Nguyen Thai Ngoc DuyMar 1, 2011
  19. Matthieu MoyMar 1, 2011
  20. Junio C HamanoMar 1, 2011
  21. Matthieu MoyMar 1, 2011
  22. Jakub NarebskiMar 1, 2011
  23. Jeff KingMar 1, 2011
  24. Junio C HamanoMar 1, 2011
  25. Matthieu MoyMar 1, 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.