git rm bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

My understanding was that running "git rm" on a file will delete all ancestors of the file that are empty directories from the file system. I've ran into a case that seems a little strange.

To reproduce (using version 1.8.4.1 on Mac OS X 10.7.5):

git init
mkdir a
mkdir b
touch a/b/c.txt
git add .
git commit

Then, running the commands

$ rm a/b/c.txt
$ git rm a/b/c.txt

deletes "c.txt" as well as both directories "a" and "b", as expected. But if I instead do

$ rm -r a/b
$ git rm a/b/c.txt

then git deletes "c.txt" and "b", but leaves "a" intact in the file system. Is this a bug?

Thank you,
Eunsuk

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]