commit - b9f899df45678237dc88ac499eb6de31a23294d5
commit + 372960fedf033e1a18e08ae30d9d0a9096206266
blob - 7f93819e7c81cad6a3fae4ea38c5564ff61ae6cf
blob + 9f27a5b3838165f5f270d7da86b7e35a5068ed48
--- Makefile.common.in
+++ Makefile.common.in
@AM_CFLAGS@ \
-g -Wall -Wno-long-long -W -Wformat=2 -Wmissing-prototypes \
-Wstrict-prototypes -Wmissing-declarations -Wwrite-strings \
- -Wshadow -Wpointer-arith -Wsign-compare -Wundef \
+ -Wshadow -Wpointer-arith -Wno-sign-compare -Wundef \
-Wbad-function-cast -Winline -Wcast-align \
-Wdeclaration-after-statement -Wno-pointer-sign \
- -Wno-attributes -Wno-unused-result
+ -Wno-attributes -Wno-unused-result \
+ -Wno-incompatible-pointer-types-discards-qualifiers
AM_CPPFLAGS += \
@AM_CPPFLAGS@ \
blob - 22b98dd9f7ee723fd045ee9edb92fdbcdc75df98
blob + f4828b6c8a7e9c290972b5457c4a9c2f7d93597b
--- regress/cmdline/commit.sh
+++ regress/cmdline/commit.sh
cat > $testroot/editor.sh <<EOF
#!/bin/sh
-sed -i 's/foo/bar/' "\$1"
+sed -i '' 's/foo/bar/' "\$1"
EOF
chmod +x $testroot/editor.sh
fi
local author_time=`git_show_author_time $testroot/repo`
- d=`env LC_TIME=C date -u -d "@$author_time" +"%a %b %e %X %Y UTC"`
+ local prev_LC_TIME="$LC_TIME"
+ export LC_TIME=C
+ d=`date -u -d "@$author_time" +"%a %b %e %X %Y UTC"`
+ LC_TIME="$prev_LC_TIME"
echo "-----------------------------------------------" > $testroot/stdout.expected
echo "commit $head_rev (master)" >> $testroot/stdout.expected
echo "from: $GOT_AUTHOR" >> $testroot/stdout.expected
fi
local author_time=`git_show_author_time $testroot/repo`
- d=`env LC_TIME=C date -u -d "@$author_time" +"%a %b %e %X %Y UTC"`
+ local prev_LC_TIME="$LC_TIME"
+ export LC_TIME=C
+ d=`date -u -d "@$author_time" +"%a %b %e %X %Y UTC"`
+ LC_TIME="$prev_LC_TIME"
echo "-----------------------------------------------" \
> $testroot/stdout.expected
echo "commit $head_rev (master)" >> $testroot/stdout.expected
blob - c0b2732f4fd9fd4cc10cc8964d7e255b1341f13b
blob + daf8b3ad0ba368a26d5b4278e6746fb270a59784
--- regress/cmdline/common.sh
+++ regress/cmdline/common.sh
export MALLOC_OPTIONS=S
+date()
+{
+ DATECMD="date"
+ [ "$OSTYPE" != "linux-gnu" ] && DATECMD="gdate"
+
+ "$DATECMD" "$@"
+}
+
+ln()
+{
+ LNCMD="ln"
+ [ "$OSTYPE" != "linux-gnu" ] && LNCMD="gln"
+
+ "$LNCMD" "$@"
+}
+
+#sed()
+#{
+# SEDCMD="sed"
+# [ "$OSTYPE" != "linux-gnu" ] && LNCMD="gsed"
+#
+# "$SEDCMD" "$@"
+#}
+
+
git_init()
{
git init -q "$1"
blob - 7bc83f4d3575b51f65002d99ae9beedadfea7495
blob + 1faa01998f546ad7441d23eeccd924bc46fd980d
--- regress/cmdline/diff.sh
+++ regress/cmdline/diff.sh
return 1
fi
- sed -i 's/2/22/' $testroot/repo/numbers
- sed -i 's/8/33/' $testroot/repo/numbers
+ sed -i '' 's/2/22/' $testroot/repo/numbers
+ sed -i '' 's/8/33/' $testroot/repo/numbers
git_commit $testroot/repo -m "modified line 2"
local head_rev=`git_show_head $testroot/repo`
# modify lines 2 and 8 in conflicting ways
- sed -i 's/2/77/' $testroot/wt/numbers
- sed -i 's/8/88/' $testroot/wt/numbers
+ sed -i '' 's/2/77/' $testroot/wt/numbers
+ sed -i '' 's/8/88/' $testroot/wt/numbers
echo "C numbers" > $testroot/stdout.expected
echo -n "Updated to refs/heads/master: $head_rev" \
blob - b41b92c7fcb1665a9350277973ed872e30f02de8
blob + bab97d4aacb49217ed5a5c0a3bf43ae8df1729eb
--- regress/cmdline/histedit.sh
+++ regress/cmdline/histedit.sh
got diff -r $testroot/repo $orig_commit $new_commit2 \
> $testroot/diff
- sed -i -e "s/$old_commit2/$new_commit2/" $testroot/diff.expected
+ sed -i '' -e "s/$old_commit2/$new_commit2/" $testroot/diff.expected
cmp -s $testroot/diff.expected $testroot/diff
ret="$?"
if [ "$ret" != "0" ]; then
# We should have a backup of old commits
(cd $testroot/repo && got histedit -l > $testroot/stdout)
d_orig1=`date -u -d "@$old_author_time1" +"%G-%m-%d"`
- d_orig2=`env LC_TIME=C date -u -d "@$old_author_time2" +"%a %b %e %X %Y UTC"`
+
+ local prev_LC_TIME="$LC_TIME"
+ export LC_TIME=C
+ d_orig2=`date -u -d "@$old_author_time2" +"%a %b %e %X %Y UTC"`
+ export LC_TIME="$prev_LC_TIME"
d_new2=`date -u -d "@$new_author_time2" +"%G-%m-%d"`
d_orig=`date -u -d "@$orig_author_time" +"%G-%m-%d"`
cat > $testroot/stdout.expected <<EOF
got diff -r $testroot/repo $orig_commit $new_commit1 \
> $testroot/diff
- sed -i -e "s/$old_commit2/$new_commit1/" $testroot/diff.expected
+ sed -i '' -e "s/$old_commit2/$new_commit1/" $testroot/diff.expected
cmp -s $testroot/diff.expected $testroot/diff
ret="$?"
if [ "$ret" != "0" ]; then
got diff -r $testroot/repo $orig_commit $new_commit2 \
> $testroot/diff
- sed -i -e "s/$old_commit1/$orig_commit/" $testroot/diff.expected
- sed -i -e "s/$old_commit2/$new_commit2/" $testroot/diff.expected
+ sed -i '' -e "s/$old_commit1/$orig_commit/" $testroot/diff.expected
+ sed -i '' -e "s/$old_commit2/$new_commit2/" $testroot/diff.expected
cmp -s $testroot/diff.expected $testroot/diff
ret="$?"
if [ "$ret" != "0" ]; then
got diff -r $testroot/repo $orig_commit $new_commit1 \
> $testroot/diff
- sed -i -e "s/$old_commit1/$new_commit1/" $testroot/diff.expected
+ sed -i '' -e "s/$old_commit1/$new_commit1/" $testroot/diff.expected
cmp -s $testroot/diff.expected $testroot/diff
ret="$?"
if [ "$ret" != "0" ]; then
cat > $testroot/editor.sh <<EOF
#!/bin/sh
-sed -i 's/.*/committing folded changes/' "\$1"
+sed -i '' 's/.*/committing folded changes/' "\$1"
EOF
chmod +x $testroot/editor.sh
cat > $testroot/editor.sh <<EOF
#!/bin/sh
-sed -i 'd' "\$1"
+sed -i '' 'd' "\$1"
EOF
chmod +x $testroot/editor.sh
blob - ad935fbf9a8d899be794504190115e1b649c0f16
blob + 0531881d4d4855f22d5d2acb605d1575c537a94d
--- regress/cmdline/rebase.sh
+++ regress/cmdline/rebase.sh
# We should have a backup of old commits
(cd $testroot/repo && got rebase -l > $testroot/stdout)
- d_orig2=`env LC_TIME=C date -u -d "@$orig_author_time2" +"%a %b %e %X %Y UTC"`
+ local prev_LC_TIME="$LC_TIME"
+ export LC_TIME=C
+ d_orig2=`date -u -d "@$orig_author_time2" +"%a %b %e %X %Y UTC"`
+ export LC_TIME="$prev_LC_TIME"
d_new2=`date -u -d "@$new_author_time2" +"%G-%m-%d"`
d_0=`date -u -d "@$commit0_author_time" +"%G-%m-%d"`
cat > $testroot/stdout.expected <<EOF
blob - f7324aa77b41d0836e1e4afad7db548534175ace
blob + d8ebff4da2318e250b48af48107b4239b2b982c9
--- regress/cmdline/revert.sh
+++ regress/cmdline/revert.sh
return 1
fi
- sed -i -e 's/^2$/a/' $testroot/wt/numbers
- sed -i -e 's/^7$/b/' $testroot/wt/numbers
- sed -i -e 's/^16$/c/' $testroot/wt/numbers
+ sed -i '' -e 's/^2$/a/' $testroot/wt/numbers
+ sed -i '' -e 's/^7$/b/' $testroot/wt/numbers
+ sed -i '' -e 's/^16$/c/' $testroot/wt/numbers
(cd $testroot/wt && got diff > $testroot/numbers.diff)
fi
# put first hunk back
- sed -i -e 's/^2$/a/' $testroot/wt/numbers
+ sed -i '' -e 's/^2$/a/' $testroot/wt/numbers
# revert middle hunk
printf "n\ny\nn\n" > $testroot/patchscript
# Ensure file size is changed. Avoids race condition causing test
# failures where 'got revert' does not see changes to revert if
# timestamps and size in stat info remain unchanged.
- sed -i -e 's/^2$/aa/' $testroot/wt/numbers
+ sed -i '' -e 's/^2$/aa/' $testroot/wt/numbers
# revert change with -p
printf "y\n" > $testroot/patchscript
blob - 6be568608fffc628917f8f2684672943768ae46e
blob + 5cba17832df6f6116c7bcae1f7fb3c259c11c230
--- regress/cmdline/status.sh
+++ regress/cmdline/status.sh
return 1
fi
- sed -i 's/2/22/' $testroot/repo/numbers
+ sed -i '' 's/2/22/' $testroot/repo/numbers
git_commit $testroot/repo -m "modified line 2"
# modify line 7; both changes should merge cleanly
- sed -i 's/7/77/' $testroot/wt/numbers
+ sed -i '' 's/7/77/' $testroot/wt/numbers
echo "G numbers" > $testroot/stdout.expected
echo -n "Updated to refs/heads/master: " >> $testroot/stdout.expected
return 1
fi
- sed -i 's/2/22/' $testroot/repo/numbers
+ sed -i '' 's/2/22/' $testroot/repo/numbers
git_commit $testroot/repo -m "modified line 2"
sleep 1
# modify line 2 again; no local changes are left after merge
- sed -i 's/2/22/' $testroot/wt/numbers
+ sed -i '' 's/2/22/' $testroot/wt/numbers
echo "G numbers" > $testroot/stdout.expected
echo -n "Updated to refs/heads/master: " >> $testroot/stdout.expected
return 1
fi
- sed -i 's/2/22/' $testroot/repo/numbers
+ sed -i '' 's/2/22/' $testroot/repo/numbers
git_commit $testroot/repo -m "modified line 2"
# modify line 2 in a conflicting way
- sed -i 's/2/77/' $testroot/wt/numbers
+ sed -i '' 's/2/77/' $testroot/wt/numbers
echo "C numbers" > $testroot/stdout.expected
echo -n "Updated to refs/heads/master: " >> $testroot/stdout.expected
blob - 6e6e9148cba91c0585e5864abd297b37af5c317a
blob + 2e90851555c6dbe52c187b1f339b87326b87ad22
--- regress/cmdline/tag.sh
+++ regress/cmdline/tag.sh
tag_id=`got ref -r $testroot/repo -l \
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
local tagger_time=`git_show_tagger_time $testroot/repo $tag`
- d1=`env LC_TIME=C date -u -d "@$tagger_time" +"%a %b %e %X %Y UTC"`
+
+ local prev_LC_TIME=$LC_TIME
+ export LC_TIME=C
+ d1=`date -u -d "@$tagger_time" +"%a %b %e %X %Y UTC"`
+ LC_TIME="$prev_LC_TIME"
+
tag_id2=`got ref -r $testroot/repo -l \
| grep "^refs/tags/$tag2" | tr -d ' ' | cut -d: -f2`
local tagger_time2=`git_show_tagger_time $testroot/repo $tag2`
- d2=`env LC_TIME=C date -u -d "@$tagger_time2" +"%a %b %e %X %Y UTC"`
+
+ prev_LC_TIME="$LC_TIME"
+ export LC_TIME=C
+ d2=`date -u -d "@$tagger_time2" +"%a %b %e %X %Y UTC"`
+ LC_TIME="$prev_LC_TIME"
got tag -r $testroot/repo -l > $testroot/stdout
tag_id=`got ref -r $testroot/repo -l \
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
local tagger_time=`git_show_author_time $testroot/repo $tag`
- d1=`env LC_TIME=C date -u -d "@$tagger_time" +"%a %b %e %X %Y UTC"`
+ local prev_LC_TIME=$LC_TIME
+ export LC_TIME=C
+ d1=`date -u -d "@$tagger_time" +"%a %b %e %X %Y UTC"`
+ LC_TIME="$prev_LC_TIME"
tag_id2=`got ref -r $testroot/repo -l \
| grep "^refs/tags/$tag2" | tr -d ' ' | cut -d: -f2`
local tagger_time2=`git_show_author_time $testroot/repo $tag2`
- d2=`env LC_TIME=C date -u -d "@$tagger_time2" +"%a %b %e %X %Y UTC"`
+
+ export LC_TIME=C
+ d2=`date -u -d "@$tagger_time2" +"%a %b %e %X %Y UTC"`
+ LC_TIME="$prev_LC_TIME"
got tag -r $testroot/repo -l > $testroot/stdout
blob - 0437598f42eff21eee8777c77ae1f578a040eaf4
blob + d93ef8c508fbe9bf2bafd25578af7d0c0c1b512b
--- regress/cmdline/update.sh
+++ regress/cmdline/update.sh
echo "modified alpha" > $testroot/repo/alpha
echo "modified beta" > $testroot/repo/beta
- sed -i 's/2/22/' $testroot/repo/numbers
+ sed -i '' 's/2/22/' $testroot/repo/numbers
git_commit $testroot/repo -m "modified 3 files"
echo "modified alpha, too" > $testroot/wt/alpha
touch $testroot/wt/beta
- sed -i 's/7/77/' $testroot/wt/numbers
+ sed -i '' 's/7/77/' $testroot/wt/numbers
echo "C alpha" > $testroot/stdout.expected
echo "U beta" >> $testroot/stdout.expected