Bug#682067: git can not clone fai config space

2013-07-02 Thread Michael Karcher
Hello everyone again,

I am sorry for my untested and wrong suggestion. I got feedback that it
doesn't work, which is due to my command is not unsetting GIT_WORK_TREE,
but setting it to an empty string instead. If the environment variable
GIT_WORK_TREE is needed (I presume it is), you need to unset it
temporarily in a subshell:
  ( unset GIT_WORK_TREE; git clone --branch ... )
I would be happy if someone tested this suggestion and can confirm that
it works.

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



Bug#682067: git can not clone fai config space

2013-07-01 Thread Michael Karcher
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



Bug#682067: git can not clone fai config space

2013-05-31 Thread Volker Epting

Package: fai-client
Version: 4.0.6

Hello,

i start to set up FAI for installing systems with debian wheezy from a debian 
wheezy FAI server.
i also can not get the config space from a git repository over ssh, same 
error/behaviour as above:

--snip--
FAI_CONFIG_SRC is set to git+ssh://user@host/srv/git/fai-wheezy.git
Checking out from git
Cloning into '/var/lib/fai/config'...
fatal: Not a git repository: '/var/lib/fai/config/.git'
Error in task confdir. Traceback: task_error _git_checkout main
--snap--

booting via PXE with kernel parameter:
FAI_CONFIG_SRC="git+ssh://user@host/srv/git/fai-wheezy.git"

i init my repository without the --bare option, so i think it is no a bare 
repository.

The suggested solution/patch works in my case, but how can i setup the 
repository correct to work without that patch?

best regards,
Volker


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org