Re: git-{diff,ls}-files from a subdirectory fails ...
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 24, 2007, 10:06 UTC
- Message-ID
- <Pine.LNX.4.64.0710241104560.25221@racer.site>
- In-Reply-To
- <20071024012038.GA31326@diana.vm.bytemark.co.uk>
Hi,
On Wed, 24 Oct 2007, Karl Hasselstr?m wrote:
Show 19 quoted lines
> ... when GIT_DIR is specified. > > I have a repository at ~/stgit-lib. With cwd at the top of the tree, > things work as expected when I set all those fancy envoronment > variables: > > kha@yoghurt:~/stgit-lib> git-diff-files --name-only > stgit/utillib.py > > kha@yoghurt:~/stgit-lib> GIT_DIR=/home/kha/stgit-lib/.git GIT_INDEX_FILE=/home/kha/stgit-lib/.git/index GIT_WORK_TREE=/home/kha/stgit-lib git-diff-files --name-only > stgit/utillib.py > > However, it doen't seem to work from a subdirectory: > > kha@yoghurt:~/stgit-lib/stgit> git-diff-files --name-only > stgit/utillib.py > > kha@yoghurt:~/stgit-lib/stgit> GIT_DIR=/home/kha/stgit-lib/.git GIT_INDEX_FILE=/home/kha/stgit-lib/.git/index GIT_WORK_TREE=/home/kha/stgit-lib git-diff-files --name-only | wc > 170 170 3560
>From looking at it (very) briefly, it seems that you encountered the same
bug that was fixed in
dd5c8af176bb935a0b01a7dc2d5e022565c3aac3(Fix setup_git_directory_gently() with relative GIT_DIR & GIT_WORK_TREE).
IOW if you run git version v1.5.3.4-14-gdd5c8af or newer, you should not experience this.
Hth, Dscho