commit 40f2f72b99bb70a7be40eada71e5acd8a77ab58d from: Thomas Adam date: Mon Mar 06 14:14:07 2023 UTC portable: regress: drop setting LC_TIME common.sh sets LC_ALL=C which makes this change unnecessary now. Patch from Christian "naddy" Weisgerber. commit - ff1048fe6533da9ae32e41ef20f87049963ff708 commit + 40f2f72b99bb70a7be40eada71e5acd8a77ab58d blob - d9de0a7673f283f1652bc23996885ba9b0ee7a76 blob + b57e9531206c81f063628b12b4a2b476cc3e6135 --- regress/cmdline/commit.sh +++ regress/cmdline/commit.sh @@ -1611,10 +1611,7 @@ test_commit_prepared_logmsg() { fi local author_time=`git_show_author_time $testroot/repo` - local prev_LC_TIME="$LC_TIME" - export LC_TIME=C d=`date -u -r $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 @@ -1653,10 +1650,7 @@ test_commit_prepared_logmsg() { fi local author_time=`git_show_author_time $testroot/repo` - local prev_LC_TIME="$LC_TIME" - export LC_TIME=C d=`date -u -r $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 - a28c22fe55ef65ffb5ea21159dd2527f7fdecb10 blob + 2544b3c1d2ee0467ce9294033382d12ae4ced52a --- regress/cmdline/histedit.sh +++ regress/cmdline/histedit.sh @@ -154,11 +154,7 @@ test_histedit_no_op() { # We should have a backup of old commits (cd $testroot/repo && got histedit -l > $testroot/stdout) d_orig1=`date -u -r $old_author_time1 +"%G-%m-%d"` - - local prev_LC_TIME="$LC_TIME" - export LC_TIME=C d_orig2=`date -u -r $old_author_time2 +"%a %b %e %X %Y UTC"` - export LC_TIME="$prev_LC_TIME" d_new2=`date -u -r $new_author_time2 +"%G-%m-%d"` d_orig=`date -u -r $orig_author_time +"%G-%m-%d"` cat > $testroot/stdout.expected < $testroot/stdout) - local prev_LC_TIME="$LC_TIME" - export LC_TIME=C d_orig2=`date -u -r $orig_author_time2 +"%a %b %e %X %Y UTC"` - export LC_TIME="$prev_LC_TIME" d_new2=`date -u -r $new_author_time2 +"%G-%m-%d"` d_0=`date -u -r $commit0_author_time +"%G-%m-%d"` cat > $testroot/stdout.expected < $testroot/stdout @@ -245,17 +236,11 @@ test_tag_list_lightweight() { 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` - local prev_LC_TIME=$LC_TIME - export LC_TIME=C d1=`date -u -r $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` - - export LC_TIME=C d2=`date -u -r $tagger_time2 +"%a %b %e %X %Y UTC"` - LC_TIME="$prev_LC_TIME" got tag -r $testroot/repo -l > $testroot/stdout