Re: [PATCH] filter-branch: always export GIT_DIR if it is set
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 5, 2007, 20:39 UTC
- Message-ID
- <7v7iqib0f6.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.64.0706051823140.4046@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 20 quoted lines
> On Tue, 5 Jun 2007, Matthias Lederhofer wrote: > >> diff --git a/git-filter-branch.sh b/git-filter-branch.sh >> index 0c8a7df..f4cfbea 100644 >> --- a/git-filter-branch.sh >> +++ b/git-filter-branch.sh >> @@ -313,9 +313,12 @@ workdir="$(pwd)" >> >> case "$GIT_DIR" in >> /*) >> + export GIT_DIR >> + export GIT_WORK_TREE=. >> ;; > > Doesn't it strike somebody else as intrusive, if GIT_WORK_TREE has to > touch that many places? > > IMHO there should be a less intrusive, and possibly simpler, way to do it. > I am not at all interested in that feature, and I don't want to suffer > bugs from it either.
I suspect "bug" might be a bit too strong a word here, but this definitely shows that work-tree series has a change of behaviour that is subtle on the suface but with a huge impact.
It _might_ a bug for filter-branch to export GIT_DIR; sh-setup deliberately chooses _not_ to export it. I haven't really thought through the issues, though...