scripts/delta: add diffstat summary

... and make output more table-like
This commit is contained in:
Daniel Stenberg 2020-09-03 08:18:32 +02:00
parent 3eff1c5092
commit b4d86d34f9
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 17 additions and 18 deletions

View File

@ -83,6 +83,9 @@ $apublic=`git grep ^CURL_EXTERN -- include/curl | wc -l`;
$bpublic=`git grep ^CURL_EXTERN $start -- include/curl | wc -l`; $bpublic=`git grep ^CURL_EXTERN $start -- include/curl | wc -l`;
$public = $apublic - $bpublic; $public = $apublic - $bpublic;
# diffstat
$diffstat=`git diff --stat $start.. | tail -1`;
# Changes/bug-fixes currently logged # Changes/bug-fixes currently logged
open(F, "<RELEASE-NOTES"); open(F, "<RELEASE-NOTES");
while(<F>) { while(<F>) {
@ -115,27 +118,23 @@ close(F);
######################################################################## ########################################################################
# Produce the summary # Produce the summary
print "== Since $start ==\n"; print "== Since $start $taggednice ==\n";
printf "Commits: %d (out of %d)\n", printf "Elapsed time: %.1f days\n",
$elapsed / 3600 / 24;
printf "Commits: %d (out of %d)\n",
$commits, $acommits; $commits, $acommits;
printf "Commit authors: %d out of which %d are new (out of %d)\n", printf "Commit authors: %d, %d new (total %d)\n",
$committers, $ncommitters, $acommitters; $committers, $ncommitters, $acommitters;
printf "Contributors in RELEASE-NOTES: %d\n", printf "Contributors: %d, %d new (total %d)\n",
$numcontributors; $numcontributors, $contribs, $acontribs;
printf "New contributors: %d (out of %d)\n", printf "New public functions: %d (total %d)\n",
$contribs, $acontribs; $public, $apublic;
printf "New curl_easy_setopt() options: %d (out of %d)\n", printf "New curl_easy_setopt() options: %d (total %d)\n",
$nsetopts, $asetopts; $nsetopts, $asetopts;
printf "New command line options: %d (out of %d)\n", printf "New command line options: %d (total %d)\n",
$noptions, $aoptions; $noptions, $aoptions;
printf "Changes logged: %d\n", $numchanges;
printf "Bugfixes logged: %d\n", $numbugfixes;
printf "Deleted %d files, added %d files (total %d)\n", printf "Deleted %d files, added %d files (total %d)\n",
$deletes, $creates, $afiles; $deletes, $creates, $afiles;
print "Diffstat:$diffstat";
printf "Elapsed time: %.1f days (since$taggednice)\n",
$elapsed / 3600 / 24;
printf "Changes logged: %d\n", $numchanges;
printf "Bugfixes logged: %d\n", $numbugfixes;
printf "New public functions: %d (out of %d)\n",
$public, $apublic;