Accidentially deleted directory, bug in git clean -d?

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

 



I accidentially deleted a directory using git clean. I would think
this is a bug, but I'm not sure. Was using 1.8.1, but upgraded to
1.9.0 just to see if it was still reproducable, and it was.

Here's a minimal way to reproduce:

$ git init
$ mkdir foo foobar
$ git clean -df foobar
Removing foo/
Removing foobar/
$ ls
$

I expected only "foobar" to be deleted, but "foo" was also deleted.

The same thing happens in the opposite case:

$ git init
$ mkdir foo foobar
$ git clean -df foo
Removing foo/
Removing foobar/
$ ls
$

However, it only happens when there is a common prefix in the names:

$ git init
$ mkdir foo bar
$ git clean -df foo
Removing foo/
$ ls
bar
$

In this case, "bar" was not deleted.

-- 
Best regards,

Robin Pedersen
Software Engineer

SnapTV AS
Jordmor Magdalenes vei 17
N-9519 Kviby.
Norway

robinp@xxxxxxx
http://www.snap.tv
--
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]