Allow gitaddrev path to be customised via environment variable
authorHugo Landau <hlandau@openssl.org>
Tue, 7 Nov 2023 07:51:58 +0000 (07:51 +0000)
committerTomas Mraz <tomas@openssl.org>
Wed, 8 Nov 2023 11:02:32 +0000 (12:02 +0100)
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/tools/pull/171)

review-tools/addrev

index 984ddf23c98a663fa25f95fd994b7a66a36a3197..9e6c19cc4decdd82cdcab5ea023d1e7bd2509846 100755 (executable)
@@ -3,6 +3,8 @@
 use strict;
 use warnings;
 
+my $gitaddrev = $ENV{GITADDREV} || "gitaddrev";
+
 my $args = "";
 my $filterargs = "";
 my $list_reviewers = 0;
@@ -67,7 +69,7 @@ foreach (@ARGV) {
 $filterargs = "HEAD^.." if $filterargs eq "";
 
 if ($list_reviewers) {
-    system("gitaddrev --list");
+    system("$gitaddrev --list");
     exit(0);
 }
 if ($help) {
@@ -87,7 +89,7 @@ if ($useself) {
 
 my $err = "/tmp/addrev$$";
 $ENV{FILTER_BRANCH_SQUELCH_WARNING} = 1;
-system("git filter-branch -f --tag-name-filter cat --msg-filter \"gitaddrev $args\" $filterargs || (echo addrev failed; exit 1)");
+system("git filter-branch -f --tag-name-filter cat --msg-filter \"$gitaddrev $args\" $filterargs || (echo addrev failed; exit 1)");
 die if $?;
 
 sub usage {