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

Re: [PATCH] Add test case for running from a subdirectory with GIT_WORK_TREE

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 28, 2007, 00:18 UTC
Message-ID
<7vodek147g.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<Pine.LNX.4.64.0710271343270.4362@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 18 quoted lines
> On Sat, 27 Oct 2007, Nguyễn Thái Ngọc Duy wrote:
>
>> +mkdir -p work/sub/dir || exit 1
>> +mv .git work
>> +if test "$1" = --normal; then
>> +	say "Normal case"
>> +else
>> +	say "Worktree case"
>> +fi
>> +test "$1" = --normal || mv work/.git repo.git || exit 1
>> +
>> +test "$1" = --normal || export GIT_DIR=$(pwd)/repo.git
>> +export GIT_CONFIG="$(pwd)"/$GIT_DIR/config
>> +test "$1" = --normal || export GIT_WORK_TREE=$(pwd)/work
>> +
>> +cd work/sub || exit 1
> ...
> Hmm?  I would like to see this test case in the official git.git.
Me too ;-)  It would help people fix the issues.
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 4 in “Add test case for running from a subdirectory with GIT_WORK_TREE”
  1. Add test case for running from a subdirectory with GIT_WORK_TREENguyễn Thái Ngọc Duy, Oct 27, 2007
  2. Johannes SchindelinOct 27, 2007
  3. Junio C HamanoOct 28, 2007
  4. Johannes SchindelinOct 27, 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.