# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 2018-2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2018-2022, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
$boptions=`git show $start:src/tool_listhelp.c 2>/dev/null | grep -c '{"....--'`;
$noptions=$aoptions - $boptions;
+# current local branch
+$branch=`git rev-parse --abbrev-ref HEAD 2>/dev/null`;
+chomp $branch;
# Number of files in git
$afiles=`git ls-files | wc -l`;
-$deletes=`git diff-tree --diff-filter=A -r --summary origin/master $start | wc -l`;
-$creates=`git diff-tree --diff-filter=D -r --summary origin/master $start | wc -l`;
+$deletes=`git diff-tree --diff-filter=A -r --summary origin/$branch $start | wc -l`;
+$creates=`git diff-tree --diff-filter=D -r --summary origin/$branch $start | wc -l`;
# Time since that tag
$tagged=`git for-each-ref --format="%(refname:short) | %(taggerdate:unix)" refs/tags/* | grep ^$start | cut "-d|" -f2`; # unix timestamp
# diffstat
$diffstat=`git diff --stat $start.. | tail -1`;
+if($diffstat =~ /^ *(\d+) files changed, (\d+) insertions\(\+\), (\d+)/) {
+ ($fileschanged, $insertions, $deletions)=($1, $2, $3);
+}
# Changes/bug-fixes currently logged
open(F, "<RELEASE-NOTES");
$noptions, $aoptions;
printf "Changes logged: %d\n", $numchanges;
printf "Bugfixes logged: %d\n", $numbugfixes;
-printf "Deleted %d files, added %d files (total %d)\n",
- $deletes, $creates, $afiles;
-print "Diffstat:$diffstat";
+printf "Added files: %d (total %d)\n",
+ $creates, $afiles;
+printf "Deleted files: %d (delta: %d)\n", $deletes,
+ $creates - $deletes;
+print "Diffstat:$diffstat" if(!$fileschanged);
+printf "Files changed: %d\n", $fileschanged;
+printf "Lines inserted: %d\n", $insertions;
+printf "Lines deleted: %d (delta: %d)\n", $deletions,
+ $insertions - $deletions;