"got blame" now shows UTC dates, adapt regression test; ok stsp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
diff --git a/regress/cmdline/blame.sh b/regress/cmdline/blame.sh
index 7fe6949..a991612 100755
--- a/regress/cmdline/blame.sh
+++ b/regress/cmdline/blame.sh
@@ -65,7 +65,7 @@ test_blame_basic() {
local short_commit2=`trim_obj_id 32 $commit2`
local short_commit3=`trim_obj_id 32 $commit3`
- d=`date -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%G-%m-%d"`
echo "1) $short_commit1 $d $GOT_AUTHOR_8 1" > $testroot/stdout.expected
echo "2) $short_commit2 $d $GOT_AUTHOR_8 2" >> $testroot/stdout.expected
echo "3) $short_commit3 $d $GOT_AUTHOR_8 3" >> $testroot/stdout.expected
@@ -113,7 +113,7 @@ test_blame_tag() {
local short_commit1=`trim_obj_id 32 $commit1`
local short_commit2=`trim_obj_id 32 $commit2`
- d=`date -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%G-%m-%d"`
echo "1) $short_commit1 $d $GOT_AUTHOR_8 1" > $testroot/stdout.expected
echo "2) $short_commit2 $d $GOT_AUTHOR_8 2" >> $testroot/stdout.expected
@@ -149,7 +149,7 @@ test_blame_file_single_line() {
local short_commit1=`trim_obj_id 32 $commit1`
- d=`date -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%G-%m-%d"`
echo "1) $short_commit1 $d $GOT_AUTHOR_8 1" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
@@ -184,7 +184,7 @@ test_blame_file_single_line_no_newline() {
local short_commit1=`trim_obj_id 32 $commit1`
- d=`date -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%G-%m-%d"`
echo "1) $short_commit1 $d $GOT_AUTHOR_8 1" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
@@ -213,7 +213,7 @@ test_blame_all_lines_replaced() {
(cd $testroot/wt && got blame alpha > $testroot/stdout)
- d=`date -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%G-%m-%d"`
echo "1) $short_commit1 $d $GOT_AUTHOR_8 1" > $testroot/stdout.expected
echo "2) $short_commit1 $d $GOT_AUTHOR_8 2" >> $testroot/stdout.expected
echo "3) $short_commit1 $d $GOT_AUTHOR_8 3" >> $testroot/stdout.expected
@@ -265,7 +265,7 @@ test_blame_lines_shifted_up() {
(cd $testroot/wt && got blame alpha > $testroot/stdout)
- d=`date -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%G-%m-%d"`
echo "1) $short_commit1 $d $GOT_AUTHOR_8 1" > $testroot/stdout.expected
echo "2) $short_commit1 $d $GOT_AUTHOR_8 2" >> $testroot/stdout.expected
echo "3) $short_commit3 $d $GOT_AUTHOR_8 foo" >> $testroot/stdout.expected
@@ -321,7 +321,7 @@ test_blame_lines_shifted_down() {
(cd $testroot/wt && got blame alpha > $testroot/stdout)
- d=`date -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%G-%m-%d"`
echo "01) $short_commit1 $d $GOT_AUTHOR_8 1" \
> $testroot/stdout.expected
echo "02) $short_commit1 $d $GOT_AUTHOR_8 2" \
@@ -394,7 +394,7 @@ EOF
local commit1=`git_show_head $testroot/repo`
local short_commit1=`trim_obj_id 32 $commit1`
local author_time1=`git_show_author_time $testroot/repo`
- local d1=`date -r $author_time1 +"%G-%m-%d"`
+ local d1=`date -u -r $author_time1 +"%G-%m-%d"`
cat > $testroot/wt/alpha <<EOF
SUBDIRS = ext modules codedocs docs
@@ -421,7 +421,7 @@ EOF
local commit2=`git_show_head $testroot/repo`
local short_commit2=`trim_obj_id 32 $commit2`
local author_time2=`git_show_author_time $testroot/repo`
- local d2=`date -r $author_time2 +"%G-%m-%d"`
+ local d2=`date -u -r $author_time2 +"%G-%m-%d"`
cat > $testroot/wt/alpha <<EOF
SUBDIRS = ext modules pdns codedocs docs
@@ -445,7 +445,7 @@ EOF
local commit3=`git_show_head $testroot/repo`
local short_commit3=`trim_obj_id 32 $commit3`
local author_time3=`git_show_author_time $testroot/repo`
- local d3=`date -r $author_time3 +"%G-%m-%d"`
+ local d3=`date -u -r $author_time3 +"%G-%m-%d"`
cat > $testroot/wt/alpha <<EOF
SUBDIRS = ext modules pdns codedocs docs
@@ -469,7 +469,7 @@ EOF
local commit4=`git_show_head $testroot/repo`
local short_commit4=`trim_obj_id 32 $commit4`
local author_time4=`git_show_author_time $testroot/repo`
- local d4=`date -r $author_time4 +"%G-%m-%d"`
+ local d4=`date -u -r $author_time4 +"%G-%m-%d"`
(cd $testroot/wt && got blame alpha > $testroot/stdout)
@@ -718,7 +718,7 @@ test_blame_added_on_branch() {
local short_commit2=`trim_obj_id 32 $commit2`
local short_commit3=`trim_obj_id 32 $commit3`
- d=`date -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%G-%m-%d"`
echo "1) $short_commit1 $d $GOT_AUTHOR_8 1" > $testroot/stdout.expected
echo "2) $short_commit2 $d $GOT_AUTHOR_8 2" >> $testroot/stdout.expected
echo "3) $short_commit3 $d $GOT_AUTHOR_8 3" >> $testroot/stdout.expected
@@ -788,7 +788,7 @@ test_blame_symlink() {
return 1
fi
- d=`date -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%G-%m-%d"`
echo "1) $short_commit0 $d $GOT_AUTHOR_8 alpha" \
> $testroot/stdout.expected
@@ -809,7 +809,7 @@ test_blame_symlink() {
return 1
fi
- d=`date -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%G-%m-%d"`
echo "1) $short_commit0 $d $GOT_AUTHOR_8 beta" \
> $testroot/stdout.expected
@@ -958,7 +958,7 @@ EOF
(cd $testroot/wt && got blame alpha > $testroot/stdout)
- d=`date -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%G-%m-%d"`
echo "1) $short_commit5 $d $GOT_AUTHOR_8 X" > $testroot/stdout.expected
echo "2) $short_commit1 $d $GOT_AUTHOR_8 A" >> $testroot/stdout.expected
echo "3) $short_commit1 $d $GOT_AUTHOR_8 B" >> $testroot/stdout.expected