From: Daniel Stenberg Date: Mon, 24 Feb 2025 12:17:38 +0000 (+0100) Subject: delta: get contributors without changing THANKS X-Git-Tag: curl-8_13_0~370 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db2fd7c3de3d8614cb338705a88f7220c1d9adbc;p=thirdparty%2Fcurl.git delta: get contributors without changing THANKS Give contrithanks.sh the option to send the list of names to stdout so that delta can use it appropriately for counting. Closes #16449 --- diff --git a/scripts/contrithanks.sh b/scripts/contrithanks.sh index a91bfeb32f..71ed92b713 100755 --- a/scripts/contrithanks.sh +++ b/scripts/contrithanks.sh @@ -24,8 +24,7 @@ ########################################################################### # -# This script shows all mentioned contributors from until HEAD and -# puts them at the end of the THANKS document on stdout +# This script updates the docs/THANKS document. # set -eu @@ -36,6 +35,13 @@ if test "$start" = "-h"; then echo "Usage: $0 " exit fi +if test "$start" = "stdout"; then + # output the names on stdout + use_stdout="yes" + start="" +else + use_stdout="no"; +fi if test -z "$start"; then start=$(git tag --sort=taggerdate | grep "^curl-" | tail -1) fi @@ -77,8 +83,10 @@ sed -f ./docs/THANKS-filter | \ sort -fu | \ grep -aixvFf ./docs/THANKS >> $rand -# output header -cat <./docs/THANKS +if test "$use_stdout" = "no"; then + + # output header + cat <./docs/THANKS This project has been alive for many years. Countless people have provided feedback that have improved curl. Here follows a list of people that have contributed (a-z order). @@ -86,8 +94,12 @@ cat <./docs/THANKS If you have contributed but are missing here, please let us know! EOF -# append all the names, sorted case insensitively -grep -v "^ " $rand | sort -f $rand >> ./docs/THANKS + # append all the names, sorted case insensitively + grep -v "^ " $rand | sort -f $rand >> ./docs/THANKS +else + # send all names on stdout + grep -v "^ " $rand | sort -f $rand +fi # get rid of the temp file rm $rand diff --git a/scripts/delta b/scripts/delta index 82c2ba1e69..25ec838630 100755 --- a/scripts/delta +++ b/scripts/delta @@ -52,7 +52,7 @@ $acommitters = `git shortlog -s | wc -l`; $ncommitters = $acommitters - $bcommitters; # number of contributors right now -$acontribs = `./scripts/contrithanks.sh | grep -c '^[^ ]'`; +$acontribs = `./scripts/contrithanks.sh stdout | wc -l`; # number when the tag was set $bcontribs = `git show $start:docs/THANKS | grep -c '^[^ ]'`; # delta