diff options
author | Jeff King <peff@peff.net> | 2011-07-30 09:05:54 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-07-31 18:40:34 -0700 |
commit | dd008b3b11286804bc7880bac10c34a76355fe92 (patch) | |
tree | 2747dab10a1a4b41468dfa34968ab32520e59a07 /t/t4013/diff.format-patch_--attach_--stdout_--suffix=.diff_initial..side | |
parent | Documentation: clarify the invalidated tree entry format (diff) | |
download | tgif-dd008b3b11286804bc7880bac10c34a76355fe92.tar.xz |
t7400: fix bogus test failure with symlinked trash
One of the tests in t7400 fails if the trash directory has a
symlink anywhere in its path. E.g.:
$ mkdir /tmp/git-test
$ mkdir /tmp/git-test/real
$ ln -s real /tmp/git-test/link
$ ./t7400-submodule-basic --root=/tmp/git-test/real
...
# passed all 44 test(s)
$ ./t7400-submodule-basic --root=/tmp/git-test/link
...
not ok - 41 use superproject as upstream when path is relative and no url is set there
The failing test does:
git submodule add ../repo relative &&
...
git submodule sync relative &&
test "$(git config submodule.relative.url)" = "$submodurl/repo"
where $submodurl comes from the $TRASH_DIRECTORY the user
gave us. However, git will resolve symlinks when converting
the relative path into an absolute one, leading them to be
textually different (even though they point to the same
directory).
Fix this by asking pwd to canonicalize the name of the trash
directory for us.
Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.format-patch_--attach_--stdout_--suffix=.diff_initial..side')
0 files changed, 0 insertions, 0 deletions