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

Re: "git rm" seems to do recursive removal even without "-r"

From
Theodore Ts'o <tytso@mit.edu>
Date
Oct 8, 2017, 18:40 UTC
Message-ID
<20171008184046.uj7gcutddli54ic3@thunk.org>
In-Reply-To
<1507473160.8322.12.camel@mad-scientist.net>
On Sun, Oct 08, 2017 at 10:32:40AM -0400, Paul Smith wrote:
Show 6 quoted lines
> Personally I don't use Git's magical globbing capabilities, and use "git
> rm" as if it were UNIX rm.  So in your request above I'd use:
> 
>    git rm $(find . -name Makefile)
> 
> which I find simpler.

I have to agree that git's magical globbing capabilities are... strange. (And apologies to Robert for my earlier post; I didn't understand what he was complaining about.) I don't use it either, although I tend to use:

    find <find args> | xargs git rm
myself.

One thing which is interesting is that not only is the git's magical globbing capabilities have somewhat unusual semantics, the how globbing is done in .gitignore entries are completely different.

Shrug. I put this in the same category as "tabs are significant in Makefile's", "whitespace is significant in python", and "the many varied different behaviours and uses of 'git reset'".

They are all idiosyncrancies of semantics of various highly popular tools (which being highly popular, would make changing the details quite difficult due to backwards compatibility concerns, even if we wanted to change them).

						- Ted
Previous: Paul SmithNext: Robert P. J. Day
Message 22 of 29 in “"git rm" seems to do recursive removal even without "-r"”
  1. Robert P. J. DayOct 7, 2017
  2. Todd ZullingerOct 7, 2017
  3. Robert P. J. DayOct 7, 2017
  4. Jeff KingOct 7, 2017
  5. Robert P. J. DayOct 7, 2017
  6. Jeff KingOct 7, 2017
  7. Robert P. J. DayOct 7, 2017
  8. Theodore Ts'oOct 7, 2017
  9. Robert P. J. DayOct 7, 2017
  10. Paul SmithOct 7, 2017
  11. Robert P. J. DayOct 7, 2017
  12. Junio C HamanoOct 8, 2017
  13. Robert P. J. DayOct 8, 2017
  14. Kevin DaudtOct 8, 2017
  15. Robert P. J. DayOct 8, 2017
  16. Martin ÅgrenOct 8, 2017
  17. René ScharfeOct 8, 2017
  18. Robert P. J. DayOct 8, 2017
  19. Heiko VoigtOct 10, 2017
  20. Robert P. J. DayOct 11, 2017
  21. Paul SmithOct 8, 2017
  22. Theodore Ts'oOct 8, 2017
  23. Robert P. J. DayOct 8, 2017
  24. Theodore Ts'oOct 8, 2017
  25. Jeff KingOct 9, 2017
  26. Robert P. J. DayOct 10, 2017
  27. Junio C HamanoOct 10, 2017
  28. Paul SmithOct 10, 2017
  29. Robert P. J. DayOct 10, 2017

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.