diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-07-24 06:29:41 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-04 11:21:44 -0700 |
commit | 8fc0ae80f6938e409e0efa45d6d504c6137744e3 (patch) | |
tree | 8c14726e50b890226775492d29acb57a4398ece3 /t/t4111-apply-subdir.sh | |
parent | 60f20d4bb4f56ae90967d810ffb042e9f76b310d (diff) | |
download | git-8fc0ae80f6938e409e0efa45d6d504c6137744e3.tar.gz |
setup: do not forget working dir from subdir of gitdir
v1.6.1.3~4^2 (Fix gitdir detection when in subdir of gitdir,
2009-01-16) did not go far enough: when a git directory is
an ancestor of the original working directory, not only
should GIT_DIR be set to point to the .git directory, but
the original working directory should be restored before
carrying out the relevant command.
This way, the effect of running a git command from a subdir
of .git will be the same whether or not GIT_DIR is explicitly
set.
Noticed while investigating v1.6.0.3~1 (rehabilitate 'git
index-pack' inside the object store, 2008-10-20).
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4111-apply-subdir.sh')
-rwxr-xr-x | t/t4111-apply-subdir.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t4111-apply-subdir.sh b/t/t4111-apply-subdir.sh index d6271ae34b..a52d94ae21 100755 --- a/t/t4111-apply-subdir.sh +++ b/t/t4111-apply-subdir.sh @@ -97,7 +97,7 @@ test_expect_success 'apply from .git dir' ' test_cmp expected .git/file ' -test_expect_failure 'apply from subdir of .git dir' ' +test_expect_success 'apply from subdir of .git dir' ' cp postimage expected && cp preimage .git/file && cp preimage .git/objects/file |