Re: bug with .git file and aliases
- From
- Santi Béjar <santi@agolina.net>
- Date
- Jul 20, 2009, 14:04 UTC
- Message-ID
- <adf1fd3d0907200704sb097a99h1ab8f118be5854f9@mail.gmail.com>
- In-Reply-To
- <7f9d599f0907200654q2e068e6aq3051c122f6596053@mail.gmail.com>
2009/7/20 Geoffrey Irving <irving@naml.us>:
Show 31 quoted lines
> git 1.6.3.3 has a bug related to .git file support and aliases. > Specifically, if you make an alias for status and call it from a > subdirectory, git status chdirs into the true .git dir but then > chdir's back to the wrong place in order to run the lstats for status. > The result is that git status thinks all files have disappeared. > > Here's a self-contained test script: > > #!/bin/bash > set -x > > # make a simple repository > mkdir repo > cd repo > git init > mkdir a > echo content > a/b > git add a/b > git commit -m "a commit" > > # replace the gitdir with a gitfile > mv .git ../repo.git > echo gitdir: `pwd`.git > .git > > # normal git status works > cd a > git status > > # an alias for git status fails > git config alias.st status > git st
I suspect that the $GIR_DIR and .git file works equally in this aspect, so you should specify where is the workdir in .git/config with respect the repository:
git config core.workdir `pwd`
HTH, Santi