Hello all, it seems like you trip around a kind of "do-what-i-mean" feature in git. If you set GIT_WORK_TREE, git clone assumes you want a detached working directory, and thus treats the command line argument as the directory you want to be $GIT_DIR. So the patch to replace $FAI by $GIT_DIR in fact does what is needed. On the other hand, breakage is observed by that patch for other people, which seems to indicate that the behaviour of git clone is not consistent over git versions.
The git version shipped in debian wheezy does the following if GIT_WORK_TREE is set: - clones the repo into what you specify on the command line (not into .git, no matter what the value of GIT_DIR is) - checks out the files into $GIT_WORK_TREE - marks the clone as non-bare repository with a non-standard working tree at $GIT_WORK_TREE As later git commands do honor $GIT_DIR, breakage occurs. My suggestion is thus a different patch: unset GIT_WORK_TREE for the checkout by running GIT_WORK_TREE= git clone --branch "$gitbranch" "$giturl" $FAI you don't need to specify the work tree in the environment variable, as you already pass the value on the command line. Regards, Michael Karcher -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org