git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-{diff,ls}-files from a subdirectory fails ...
@ 2007-10-24  1:20 Karl Hasselström
  2007-10-24 10:06 ` Johannes Schindelin
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Hasselström @ 2007-10-24  1:20 UTC (permalink / raw)
  To: git

... 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

Instead of just the one changed file, I get a list of what looks like
all the files in the project, suggesting that maybe git assumes I'm at
the root of the worktree when I'm not.

git-ls-files seems to behave the same way. Bug or user error?

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-10-24 11:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-24  1:20 git-{diff,ls}-files from a subdirectory fails Karl Hasselström
2007-10-24 10:06 ` Johannes Schindelin
2007-10-24 10:40   ` Karl Hasselström
2007-10-24 11:26     ` Karl Hasselström

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).