commit - a926e3a4334151b10e2b78e1fa3f2a59a44c71f2
commit + 11db6024f7d98487225cb67a501c6b6ba06fc816
blob - 5639241ed852fec40a37bd8643d4b3c0a9f280f8
blob + a6420b5e5c54a7824b5cd5c7c2c0f0fa4ee841a2
--- got/got.c
+++ got/got.c
int annotated;
char *id_str;
char *committer;
- char datebuf[9]; /* YY-MM-DD + NUL */
+ char datebuf[11]; /* YYYY-MM-DD + NUL */
};
struct blame_cb_args {
committer_time = got_object_commit_get_committer_time(commit);
if (localtime_r(&committer_time, &tm) == NULL)
return got_error_from_errno("localtime_r");
- if (strftime(bline->datebuf, sizeof(bline->datebuf), "%g/%m/%d",
+ if (strftime(bline->datebuf, sizeof(bline->datebuf), "%G/%m/%d",
&tm) >= sizeof(bline->datebuf)) {
err = got_error(GOT_ERR_NO_SPACE);
goto done;
blob - 194bcdf0178508b25beca839c298348310aa4588
blob + 8f4e9a17dc61b16779b081d5713cbb26d0e6bcd9
--- regress/cmdline/blame.sh
+++ regress/cmdline/blame.sh
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 -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
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 -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
local short_commit1=`trim_obj_id 32 $commit1`
- d=`date -r $author_time +"%g/%m/%d"`
+ d=`date -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
local short_commit1=`trim_obj_id 32 $commit1`
- d=`date -r $author_time +"%g/%m/%d"`
+ d=`date -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
(cd $testroot/wt && got blame alpha > $testroot/stdout)
- d=`date -r $author_time +"%g/%m/%d"`
+ d=`date -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
(cd $testroot/wt && got blame alpha > $testroot/stdout)
- d=`date -r $author_time +"%g/%m/%d"`
+ d=`date -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
(cd $testroot/wt && got blame alpha > $testroot/stdout)
- d=`date -r $author_time +"%g/%m/%d"`
+ d=`date -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" \
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 -r $author_time1 +"%G/%m/%d"`
cat > $testroot/wt/alpha <<EOF
SUBDIRS = ext modules codedocs docs
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 -r $author_time2 +"%G/%m/%d"`
cat > $testroot/wt/alpha <<EOF
SUBDIRS = ext modules pdns codedocs docs
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 -r $author_time3 +"%G/%m/%d"`
cat > $testroot/wt/alpha <<EOF
SUBDIRS = ext modules pdns codedocs docs
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 -r $author_time4 +"%G/%m/%d"`
(cd $testroot/wt && got blame alpha > $testroot/stdout)