commit - 07ec47fcdf114314de1cd6ce155420b43f1fd58a
commit + c24e2d2e71abf0ac4feb95dc4f238d454819fed9
blob - 5f09ada324b00bff599343c546bea9dacc1e0e7f
blob + 87d939ce395b929e50c9e3257153b56b51c83716
--- cvg/cvg.c
+++ cvg/cvg.c
err = got_error_from_errno("gmtime_r");
goto done;
}
- if (strftime(datebuf, sizeof(datebuf), "%G-%m-%d ", &tm) == 0) {
+ if (strftime(datebuf, sizeof(datebuf), "%F ", &tm) == 0) {
err = got_error(GOT_ERR_NO_SPACE);
goto done;
}
committer_time = got_object_commit_get_committer_time(commit);
if (gmtime_r(&committer_time, &tm) == NULL)
return got_error_from_errno("gmtime_r");
- if (strftime(bline->datebuf, sizeof(bline->datebuf), "%G-%m-%d",
- &tm) == 0) {
+ if (strftime(bline->datebuf, sizeof(bline->datebuf), "%F", &tm) == 0) {
err = got_error(GOT_ERR_NO_SPACE);
goto done;
}
blob - f784cc2785cf56da4f06a59cf3e4dfe590b448f7
blob + e0577ffe7a750a0af1c9d7e538b8aaa3ad776e4f
--- got/got.c
+++ got/got.c
err = got_error_from_errno("gmtime_r");
goto done;
}
- if (strftime(datebuf, sizeof(datebuf), "%G-%m-%d ", &tm) == 0) {
+ if (strftime(datebuf, sizeof(datebuf), "%F ", &tm) == 0) {
err = got_error(GOT_ERR_NO_SPACE);
goto done;
}
committer_time = got_object_commit_get_committer_time(commit);
if (gmtime_r(&committer_time, &tm) == NULL)
return got_error_from_errno("gmtime_r");
- if (strftime(bline->datebuf, sizeof(bline->datebuf), "%G-%m-%d",
- &tm) == 0) {
+ if (strftime(bline->datebuf, sizeof(bline->datebuf), "%F", &tm) == 0) {
err = got_error(GOT_ERR_NO_SPACE);
goto done;
}
committer_time = got_object_commit_get_committer_time(commit);
if (gmtime_r(&committer_time, &tm) == NULL)
return got_error_from_errno("gmtime_r");
- if (strftime(datebuf, sizeof(datebuf), "%G-%m-%d", &tm) == 0)
+ if (strftime(datebuf, sizeof(datebuf), "%F", &tm) == 0)
return got_error(GOT_ERR_NO_SPACE);
author0 = strdup(got_object_commit_get_author(commit));
blob - 07339da5ff621660e4c150897625cddae6256dc6
blob + 57a7b1c2380a5ce645a15be3ed4ab9fa4f2a60f7
--- gotd/libexec/got-notify-email/got-notify-email.c
+++ gotd/libexec/got-notify-email/got-notify-email.c
return got_poll_write_full(s, " UTC\n", 5);
}
- if (strftime(datebuf, sizeof(datebuf), "%G-%m-%d ", &tm) == 0)
+ if (strftime(datebuf, sizeof(datebuf), "%F ", &tm) == 0)
return got_error_set_errno(EINVAL, "invalid timestamp");
return got_poll_write_full(s, datebuf, strlen(datebuf));
}
blob - c76dcd4645b83f87a2252fbd462d25a8ad081d9c
blob + 1193e36c4c47eb24278e0fbb83ac08648a508bc6
--- gotwebd/got_operations.c
+++ gotwebd/got_operations.c
committer_time = got_object_commit_get_committer_time(commit);
if (gmtime_r(&committer_time, &tm) == NULL)
return got_error_from_errno("gmtime_r");
- if (strftime(bline->datebuf, sizeof(bline->datebuf), "%G-%m-%d",
- &tm) == 0) {
+ if (strftime(bline->datebuf, sizeof(bline->datebuf), "%F", &tm) == 0) {
err = got_error(GOT_ERR_NO_SPACE);
goto done;
}
blob - 4281311847e1767c625823074c5208dc9f177123
blob + d60fc3d989f80b6803c66daddd2280f9ac6bee96
--- 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 -u -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%F"`
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 -u -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%F"`
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 -u -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%F"`
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 -u -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%F"`
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 -u -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%F"`
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 -u -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%F"`
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 -u -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%F"`
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 -u -r $author_time1 +"%G-%m-%d"`
+ local d1=`date -u -r $author_time1 +"%F"`
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 -u -r $author_time2 +"%G-%m-%d"`
+ local d2=`date -u -r $author_time2 +"%F"`
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 -u -r $author_time3 +"%G-%m-%d"`
+ local d3=`date -u -r $author_time3 +"%F"`
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 -u -r $author_time4 +"%G-%m-%d"`
+ local d4=`date -u -r $author_time4 +"%F"`
(cd $testroot/wt && got blame alpha > $testroot/stdout)
local short_commit2=`trim_obj_id 32 $commit2`
local short_commit3=`trim_obj_id 32 $commit3`
- d=`date -u -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%F"`
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
return 1
fi
- d=`date -u -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%F"`
echo "1) $short_commit0 $d $GOT_AUTHOR_8 alpha" \
> $testroot/stdout.expected
return 1
fi
- d=`date -u -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%F"`
echo "1) $short_commit0 $d $GOT_AUTHOR_8 beta" \
> $testroot/stdout.expected
(cd $testroot/wt && got blame alpha > $testroot/stdout)
- d1=`date -u -r $author_time1 +"%G-%m-%d"`
- d2=`date -u -r $author_time2 +"%G-%m-%d"`
- d4=`date -u -r $author_time4 +"%G-%m-%d"`
- d5=`date -u -r $author_time5 +"%G-%m-%d"`
+ d1=`date -u -r $author_time1 +"%F"`
+ d2=`date -u -r $author_time2 +"%F"`
+ d4=`date -u -r $author_time4 +"%F"`
+ d5=`date -u -r $author_time5 +"%F"`
echo "1) $short_commit5 $d5 $GOT_AUTHOR_8 X" > $testroot/stdout.expected
echo "2) $short_commit1 $d1 $GOT_AUTHOR_8 A" >> $testroot/stdout.expected
echo "3) $short_commit1 $d1 $GOT_AUTHOR_8 B" >> $testroot/stdout.expected
done
local author_time=$(git_show_author_time "$repo")
- local d=$(date -u -r $author_time +"%G-%m-%d")
+ local d=$(date -u -r $author_time +"%F")
got blame -r "$repo" -c:head:-8 alpha > "$testroot/stdout"
echo "1) $(pop_idx 1 $@) $d $GOT_AUTHOR_8 alpha" > \
blob - 13dd31e4feec963e558e3e0eebbcfac22c15c741
blob + b0adfd36a468c7760119682e77e3c30152401592
--- regress/cmdline/histedit.sh
+++ regress/cmdline/histedit.sh
# 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"`
+ d_orig1=`date -u -r $old_author_time1 +"%F"`
d_orig2=`date -u -r $old_author_time2 +"%a %b %e %X %Y UTC"`
- d_new2=`date -u -r $new_author_time2 +"%G-%m-%d"`
- d_orig=`date -u -r $orig_author_time +"%G-%m-%d"`
+ d_new2=`date -u -r $new_author_time2 +"%F"`
+ d_orig=`date -u -r $orig_author_time +"%F"`
cat > $testroot/stdout.expected <<EOF
-----------------------------------------------
commit $old_commit2 (formerly master)
blob - c3e22d2178b4eebd38723079274f19c9e8b9d2d5
blob + 2f9468695f6cf968b15297cfe13f3ecee0544e73
--- regress/cmdline/log.sh
+++ regress/cmdline/log.sh
local commit_id2=`git_show_head $testroot/repo`
local author_time2=`git_show_author_time $testroot/repo`
- d=`date -u -r $author_time1 +"%G-%m-%d"`
+ d=`date -u -r $author_time1 +"%F"`
printf "$d %-7s test oneline\n" master > $testroot/stdout.expected
- d=`date -u -r $author_time2 +"%G-%m-%d"`
+ d=`date -u -r $author_time2 +"%F"`
printf "$d %.7s test oneline\n" $commit_id1 >> $testroot/stdout.expected
(cd $testroot/repo && got log -s | head -n 2 > $testroot/stdout)
test_log_commit_keywords() {
local testroot=$(test_init log_commit_keywords)
local commit_time=`git_show_author_time $testroot/repo`
- local d=`date -u -r $commit_time +"%G-%m-%d"`
+ local d=`date -u -r $commit_time +"%F"`
set -- "$(git_show_head $testroot/repo)"
local short_commit2=`trim_obj_id 33 $commit2`
local short_commit3=`trim_obj_id 33 $commit3`
- d_0=`date -u -r $author_time0 +"%G-%m-%d"`
- d_1=`date -u -r $author_time1 +"%G-%m-%d"`
- d_2=`date -u -r $author_time2 +"%G-%m-%d"`
- d_3=`date -u -r $author_time3 +"%G-%m-%d"`
- d_m=`date -u -r $merge_time +"%G-%m-%d"`
+ d_0=`date -u -r $author_time0 +"%F"`
+ d_1=`date -u -r $author_time1 +"%F"`
+ d_2=`date -u -r $author_time2 +"%F"`
+ d_3=`date -u -r $author_time3 +"%F"`
+ d_m=`date -u -r $merge_time +"%F"`
got log -r $testroot/repo -s -b -t > $testroot/stdout
cat > $testroot/stdout.expected <<EOF
blob - ee6fefa31ac2365004dd760838761c9cba5e07a1
blob + fae088133932111b4944a156b5ea1ac14d52df37
--- 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=`date -u -r $orig_author_time2 +"%a %b %e %X %Y UTC"`
- d_new2=`date -u -r $new_author_time2 +"%G-%m-%d"`
- d_0=`date -u -r $commit0_author_time +"%G-%m-%d"`
+ d_new2=`date -u -r $new_author_time2 +"%F"`
+ d_0=`date -u -r $commit0_author_time +"%F"`
cat > $testroot/stdout.expected <<EOF
-----------------------------------------------
commit $orig_commit2 (formerly newbranch)
blob - 807c18616e33a8a87ad3db0a355f974f13c8622d
blob + f95b00932a0932131a46023cbdd33283f82a5563
--- regress/gotd/email_notification.sh
+++ regress/gotd/email_notification.sh
local commit_id=`git_show_head $testroot/repo-clone`
local short_commit_id=`trim_obj_id 33 $commit_id`
local author_time=`git_show_author_time $testroot/repo-clone`
- d=`date -u -r $author_time +"%G-%m-%d"`
+ d=`date -u -r $author_time +"%F"`
set -- "$@" "$short_commit_id $d"
done
blob - 9f57e1d06d86371e2c8f959955561a8b2d951823
blob + 2a1df1daa4d10bc1df74a5b3e633844cb71a60eb
--- regress/tog/blame.sh
+++ regress/tog/blame.sh
(cd $testroot/wt && got commit -m "c change" > /dev/null)
local commit_id4=`git_show_head $testroot/repo`
local author_time=`git_show_author_time $testroot/repo`
- local ymd=`date -u -r $author_time +"%G-%m-%d"`
+ local ymd=`date -u -r $author_time +"%F"`
cat <<EOF >$TOG_TEST_SCRIPT
WAIT_FOR_UI wait for blame to finish
local wt="$testroot/wt"
local id=$(git_show_head "$repo")
local author_time=$(git_show_author_time "$repo")
- local ymd=$(date -u -r $author_time +"%G-%m-%d")
+ local ymd=$(date -u -r $author_time +"%F")
set -- "$id"
done
author_time=$(git_show_author_time "$repo")
- ymd=$(date -u -r $author_time +"%G-%m-%d")
+ ymd=$(date -u -r $author_time +"%F")
# :base:- keyword in work tree
cat <<-EOF >$testroot/view.expected
blob - bc8e1f86537b6f5d928c84cdd4144af824835317
blob + aca1f106300cbd9e2079fa5bedad94acb5af6f36
--- regress/tog/log.sh
+++ regress/tog/log.sh
local head_id=`git_show_head $testroot/repo`
local author_time=`git_show_author_time $testroot/repo`
local date=`date -u -r $author_time +"%a %b %e %X %Y UTC"`
- local ymd=`date -u -r $author_time +"%G-%m-%d"`
+ local ymd=`date -u -r $author_time +"%F"`
cat <<EOF >$TOG_TEST_SCRIPT
KEY_ENTER open diff view of selected commit
local head_id=`git_show_head $testroot/repo`
local author_time=`git_show_author_time $testroot/repo`
local date=`date -u -r $author_time +"%a %b %e %X %Y UTC"`
- local ymd=`date -u -r $author_time +"%G-%m-%d"`
+ local ymd=`date -u -r $author_time +"%F"`
local blobid_alpha=`get_blob_id $testroot/repo "" alpha`
local blobid_beta=`get_blob_id $testroot/repo "" beta`
local head_id=`git_show_head $testroot/repo`
local author_time=`git_show_author_time $testroot/repo`
local date=`date -u -r $author_time +"%a %b %e %X %Y UTC"`
- local ymd=`date -u -r $author_time +"%G-%m-%d"`
+ local ymd=`date -u -r $author_time +"%F"`
local head_id_len8=`trim_obj_id 32 $head_id`
echo "mod alpha" > $testroot/repo/alpha
local head_id=`git_show_head $testroot/repo`
local author_time=`git_show_author_time $testroot/repo`
local date=`date -u -r $author_time +"%a %b %e %X %Y UTC"`
- local ymd=`date -u -r $author_time +"%G-%m-%d"`
+ local ymd=`date -u -r $author_time +"%F"`
local msg="scroll this log message to the right four characters"
local scrolled_msg="ter] scroll this log message to the right four character"
local head_id=`git_show_head $testroot/repo`
local author_time=`git_show_author_time $testroot/repo`
local date=`date -u -r $author_time +"%a %b %e %X %Y UTC"`
- local ymd=`date -u -r $author_time +"%G-%m-%d"`
+ local ymd=`date -u -r $author_time +"%F"`
cat <<EOF >$TOG_TEST_SCRIPT
R open ref view
local head_id=`git_show_head $testroot/repo`
local author_time=`git_show_author_time $testroot/repo`
local date=`date -u -r $author_time +"%a %b %e %X %Y UTC"`
- local ymd=`date -u -r $author_time +"%G-%m-%d"`
+ local ymd=`date -u -r $author_time +"%F"`
cat <<EOF >$TOG_TEST_SCRIPT
T open tree view
local wt="$testroot/wt"
local id=$(git_show_head "$repo")
local author_time=$(git_show_author_time "$repo")
- local ymd=$(date -u -r $author_time +"%G-%m-%d")
+ local ymd=$(date -u -r $author_time +"%F")
set -- "$id"
local head_id=$(git_show_head "$repo")
local author_time=$(git_show_author_time "$repo")
- local ymd=$(date -u -r "$author_time" +"%G-%m-%d")
+ local ymd=$(date -u -r "$author_time" +"%F")
# check up-to-date base commit marker prefixes base commit log message
cat <<-EOF >$TOG_TEST_SCRIPT
return 1
fi
local author_time=$(git_show_author_time "$repo")
- local ymd=$(date -u -r $author_time +"%G-%m-%d")
+ local ymd=$(date -u -r $author_time +"%F")
local id=$(git_show_head "$repo")
# check base commit marker is not drawn
done
local author_time=$(git_show_author_time "$repo")
- local ymd=$(date -u -r $author_time +"%G-%m-%d")
+ local ymd=$(date -u -r $author_time +"%F")
cat <<-EOF >$TOG_TEST_SCRIPT
/alpha commit 8
blob - c1bf4e3aa81fc1c0a524ddb49c9a50842105c77c
blob + 23d3862bd60b306cd65d724e25b63a2ceb8ce659
--- tog/tog.c
+++ tog/tog.c
committer_time = got_object_commit_get_committer_time(commit);
if (gmtime_r(&committer_time, &tm) == NULL)
return got_error_from_errno("gmtime_r");
- if (strftime(datebuf, sizeof(datebuf), "%G-%m-%d ", &tm) == 0)
+ if (strftime(datebuf, sizeof(datebuf), "%F ", &tm) == 0)
return got_error(GOT_ERR_NO_SPACE);
if (avail <= date_display_cols)
free(id);
if (gmtime_r(&t, &tm) == NULL)
return got_error_from_errno("gmtime_r");
- if (strftime(ymd, sizeof(ymd), "%G-%m-%d ", &tm) == 0)
+ if (strftime(ymd, sizeof(ymd), "%F ", &tm) == 0)
return got_error(GOT_ERR_NO_SPACE);
}
if (got_ref_is_symbolic(re->ref)) {