]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
scripts/delta: fix "ambiguous argument" when used in branches
authorDaniel Stenberg <daniel@haxx.se>
Fri, 17 Mar 2023 23:41:08 +0000 (00:41 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 18 Mar 2023 09:22:58 +0000 (10:22 +0100)
scripts/delta

index 7e55b16721621a128853e59b052c91faa7c82185..3920a79aec001689f6d53ee33a3659b6048cf0ad 100755 (executable)
@@ -85,8 +85,8 @@ $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/$branch $start | wc -l`;
-$creates=`git diff-tree --diff-filter=D -r --summary origin/$branch $start | wc -l`;
+$deletes=`git diff-tree --diff-filter=A -r --summary origin/$branch $start 2>/dev/null | wc -l`;
+$creates=`git diff-tree --diff-filter=D -r --summary origin/$branch $start 2>/dev/null| 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