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

Re: [PATCH] Add missing inside_work_tree setting in setup_git_directory_gently

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 7, 2007, 20:54 UTC
Message-ID
<Pine.LNX.4.64.0711072053490.4362@racer.site>
In-Reply-To
<7vve8daisu.fsf@gitster.siamese.dyndns.org>
Hi,
On Wed, 7 Nov 2007, Junio C Hamano wrote:
Show 40 quoted lines
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
> 
> > On Sat, Nov 03, 2007 at 09:33:40PM -0700, Junio C Hamano wrote:
> >> 
> >> Please add automated test script for this, thanks.
> >
> > Thank you for reminding.  I tried to put a test in
> > t1501-worktree.sh and found out core.worktree can override
> > inside_work_tree previously set by setup_git_directory_gently(),
> > activating the worktree code in setup_git_directory() again.
> >
> > This made me think setup_git_directory_gently() should use
> > get_git_work_tree() instead. But then git_work_tree_cfg may not be
> > initialized when get_git_work_tree() is called (starting from
> > setup_git_directory(), git_work_tree_cfg is initialized in
> > check_repository_format_version(), which is called _after_
> > setup_git_directory_gently()).
> >
> > The interaction between these variables and functions is really beyond
> > my knowledge. Johannes, can you have a look at this? In theory the
> > following test should pass:
> >
> > diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh
> > index 7ee3820..bdb7720 100755
> > --- a/t/t1501-worktree.sh
> > +++ b/t/t1501-worktree.sh
> > @@ -103,6 +103,11 @@ test_expect_success 'repo finds its work tree from work tree, too' '
> >  	 test sub/dir/tracked = "$(git ls-files)")
> >  '
> >  
> > +test_expect_success 'Try a command from subdir in worktree' '
> > +	(cd repo.git/work/sub &&
> > +	GIT_DIR=../.. GIT_WORK_TREE=.. git blame dir/tracked)
> > +'
> > +
> >  test_expect_success '_gently() groks relative GIT_DIR & GIT_WORK_TREE' '
> >  	cd repo.git/work/sub/dir &&
> >  	GIT_DIR=../../.. GIT_WORK_TREE=../.. GIT_PAGER= \
> 
> I am wondering what happened to this thread...

It is still in my inbox, waiting for a time where I can actually concentrate.

Ciao, Dscho

Previous: Junio C HamanoNext: Johannes Schindelin
Message 8 of 11 in “Add missing inside_work_tree setting in setup_git_directory_gently”
  1. Add missing inside_work_tree setting in setup_git_directory_gentlyNguyễn Thái Ngọc Duy, Nov 3, 2007
  2. Johannes SchindelinNov 3, 2007
  3. Add missing inside_work_tree setting in setup_git_directory_gentlyNguyễn Thái Ngọc Duy, Nov 3, 2007
  4. Johannes SchindelinNov 3, 2007
  5. Junio C HamanoNov 4, 2007
  6. Nguyen Thai Ngoc DuyNov 4, 2007
  7. Junio C HamanoNov 7, 2007
  8. Johannes SchindelinNov 7, 2007
  9. Johannes SchindelinNov 9, 2007
  10. builtin-blame: set up the work_tree before the first file accessJohannes Schindelin, Nov 9, 2007
  11. Johannes SchindelinNov 3, 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.