Hello
I'm a little bit confused about the behavior of git clean when trying to
clean multiple files/directories at once. For instance if I create two
directories with an empty file in an new git repository as such:
mkdir tmprepo
cd tmprepo
git init
mkdir a b
touch a/file b/file
and
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/
Hi.
Passing to git clean wrong (non-existent) paths together with valid
ones, causes it to delete stuff that it shouldn't.
Am I right?
Script to reproduce:
mkdir test
cd test
git init .
mkdir ba
mkdir ba/ca
# So far so good.
# Should clean directory ba/ca
git clean -dn -- ba/ca
# Should clean
3 matches
Mail list logo