git ate my home directory :-(

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

 



Hi!

Today I've discovered that on the build server my home directory was empty.
A post-mortem analysis showed that the git-clean command I've added to my kernel build script
is the evil doer.
In my scripts I'm setting GIT_DIR to use git-fetch and git-reset without changing the
current working directory all the time.
But calling git-clean with GIT_DIR acts basically like a "rm -Rf .".

Here a small demo:

test@linux:~> git --version
git version 1.8.1.4
test@linux:~> ls
test@linux:~> touch a b c d e
test@linux:~> mkdir x
test@linux:~> cd x
test@linux:~/x> git init
Initialized empty Git repository in /home/test/x/.git/
test@linux:~/x> cd ..
test@linux:~> ls
a  b  c  d  e  x
test@linux:~> export GIT_DIR=/home/test/x/.git/
test@linux:~> git clean -d -f
Removing a
Removing b
Removing c
Removing d
Removing e
Removing x/
test@linux:~> ls
test@linux:~>
test@linux:~> # :-(

Is this behavior intended?

Thanks,
//richard
--
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]