git clean removes directories when not asked to

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

 



This is with debian packaged 1.5.4.4.

When invoked from a subdirectory, git clean removes more than it
should. According to the documentation, it should not remove
directories unless "-d" is given. However:


pep ~/src/test 0$ git init
Initialized empty Git repository in .git/
pep ~/src/test|master 0$ mkdir dir
pep ~/src/test|master 0$ mkdir dir/subdir
pep ~/src/test|master 0$ git clean -f
Not removing dir/
pep ~/src/test|master 0$ cd dir
pep ~/src/test/dir|master 0$ git clean -f
Removing subdir/
pep ~/src/test/dir|master 0$ ls subdir
ls: cannot access subdir: No such file or directory


Luckily I just lost some compilation results in this case, but this is
unexpected and dangerous behaviour.


(Additionally, I find the "-f" slightly annoying but that's not an issue here.)


-j

--
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]

  Powered by Linux