Skip to content

Commit

Permalink
Work around broken ln on solaris as used in t8006
Browse files Browse the repository at this point in the history
The test setup in t8006-blame-textconv.sh uses "ln -sf" to
overwrite an existing symlink.  Unfortunately, both /usr/bin/ln
and /usr/xpg4/bin/ln on solaris 9 don't properly handle -f and -s
used at the same time.  This caused the test setup and subsequent
checks to fail.

Instead, remove the symlink and then create a new one in the
setup code.

The upstream Solaris bug (fixed in 10, but not 9) is documented
here:

  http://bugs.opensolaris.org/view_bug.do?bug_id=4372462

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ben Walton authored and Junio C Hamano committed Mar 21, 2011
1 parent 9aec68d commit c3786c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion t/t8006-blame-textconv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ test_expect_success 'setup ' '
echo "bin: test 1 version 2" >one.bin &&
echo "bin: test number 2 version 2" >>two.bin &&
if test_have_prereq SYMLINKS; then
ln -sf two.bin symlink.bin
rm symlink.bin &&
ln -s two.bin symlink.bin
fi &&
GIT_AUTHOR_NAME=Number2 git commit -a -m Second --date="2010-01-01 20:00:00"
'
Expand Down

0 comments on commit c3786c8

Please sign in to comment.