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

Re: On removing files and "git-rm is pointless"

From
Horst H. von Brand <vonbrand@inf.utfsm.cl>
Date
Dec 2, 2006, 20:59 UTC
Message-ID
<200612022059.kB2Kx565009646@laptop13.inf.utfsm.cl>
In-Reply-To
<torvalds@osdl.org>
Linus Torvalds <torvalds@osdl.org> wrote:
[...]
Show 10 quoted lines
> One thing to look out for: "git rm" actually defaults to the recursive 
> behaviour, something that might take people by surprise. If you give it a 
> directory name, it will happily delete all tracked files from within that 
> directory, even without "-r". That is probably a design mistake. So it 
> would probably make sense to:
> 
>  - without "-r", don't do the partial matches at the beginning (but still 
>    do globbing matches, of course, so "git rm dir/*" wouldn't need an 
>    "-r", but "git rm -r dir/", which does the same thing, _would_ need an 
>    "-r" to be effective)

The command should never even see the '*' here. Globbing is handled (uniformly) by the shell. Don't loose that.

-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                    Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria             +56 32 2654239
Previous: Petr BaudisNext: Sam Vilain
Message 17 of 19 in “Re: Trial git RPM's..”
  1. Horst von BrandJul 11, 2005
  2. Horst von BrandSep 16, 2005
  3. Horst von BrandSep 29, 2005
  4. Linus TorvaldsSep 30, 2005
  5. Junio C HamanoSep 30, 2005
  6. Linus TorvaldsSep 30, 2005
  7. Linus TorvaldsOct 1, 2005
  8. Horst von BrandOct 1, 2005
  9. Linus TorvaldsOct 3, 2005
  10. Horst von BrandNov 1, 2005
  11. Horst von BrandMay 27, 2006
  12. Support for configurable git command aliasesPetr Baudis, May 28, 2006
  13. Jakub NarebskiMay 28, 2006
  14. Jeff KingMay 29, 2006
  15. Junio C HamanoMay 29, 2006
  16. Petr BaudisMay 29, 2006
  17. Horst H. von BrandDec 2, 2006
  18. Sam VilainDec 2, 2006
  19. Linus TorvaldsDec 2, 2006

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.