Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:45

Johannes Schindelin [off-list ref] writes:
On Sat, 27 Oct 2007, Nguyễn Thái Ngọc Duy wrote:
quoted
+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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help