git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Johannes SchindelinNext: Matthias Lederhofer
Message 10 of 22 in “[RFC] GIT_WORK_TREE”
  1. Matthias LederhoferJun 3, 2007
  2. 1/7 rev-parse: document --is-inside-git-dirMatthias Lederhofer, Jun 3, 2007
  3. 2/7 rev-parse: introduce --is-bare-repositoryMatthias Lederhofer, Jun 3, 2007
  4. 3/7 test git rev-parseMatthias Lederhofer, Jun 3, 2007
  5. 3/7 test git rev-parseMatthias Lederhofer, Jun 6, 2007
  6. 4/7 introduce GIT_WORK_TREE to specify the work treeMatthias Lederhofer, Jun 3, 2007
  7. Junio C HamanoJun 5, 2007
  8. filter-branch: always export GIT_DIR if it is setMatthias Lederhofer, Jun 5, 2007
  9. Johannes SchindelinJun 5, 2007
  10. Junio C HamanoJun 5, 2007
  11. filter-branch: always export GIT_DIR if it is setMatthias Lederhofer, Jun 6, 2007
  12. 4/7 introduce GIT_WORK_TREE to specify the work treeMatthias Lederhofer, Jun 6, 2007
  13. Matthias LederhoferJun 3, 2007
  14. Matthias LederhoferJun 3, 2007
  15. 6/7 extend rev-parse test for --is-inside-work-treeMatthias Lederhofer, Jun 3, 2007
  16. 6/7 extend rev-parse test for --is-inside-work-treeMatthias Lederhofer, Jun 6, 2007
  17. 7/7 test GIT_WORK_TREEMatthias Lederhofer, Jun 3, 2007
  18. 7/7 test GIT_WORK_TREEMatthias Lederhofer, Jun 6, 2007
  19. SergioJun 3, 2007
  20. Matthias LederhoferJun 3, 2007
  21. SergioJun 3, 2007
  22. setup_git_directory: fix segfault if repository is found in cwdMatthias Lederhofer, Jun 6, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.