[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser-spec/master] Use specified commit in audit, not merge-base



commit b517c451542bd7fb7663f5e8e41de1065a2207a7
Author: Matthew Finkel <sysrqb@xxxxxxxxxxxxxx>
Date:   Fri Nov 13 00:14:37 2020 +0000

    Use specified commit in audit, not merge-base
---
 audits/java_audit.sh | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/audits/java_audit.sh b/audits/java_audit.sh
index e085b57..3e94fa3 100644
--- a/audits/java_audit.sh
+++ b/audits/java_audit.sh
@@ -57,15 +57,15 @@ cd $REPO_DIR
 #function join_by { local d=$1; shift; local f=$1; shift; printf %s "$f" "${@/#/ $d}"; }
 #GREP_LINE="$(join_by \-G ${KEYWORDS[@]})"
 
-base=`git merge-base ${OLD} ${NEW}`
+#base=`git merge-base ${OLD} ${NEW}`
 
-#if [ ! -f "release-${OLD}-${NEW}.diff" ];
-if [ ! -f "release-${base}-${NEW}.diff" ];
+if [ ! -f "release-${OLD}-${NEW}.diff" ];
+#if [ ! -f "release-${base}-${NEW}.diff" ];
 then
-  #echo "Diffing release-${OLD}-${NEW}.diff"
-  echo "Diffing release-${base}-${NEW}.diff"
-  #git diff --color=always --color-moved origin/$OLD origin/$NEW -U20 > release-${OLD}-${NEW}.diff
-  git diff --color=always --color-moved $base $NEW -U20 > release-${base}-${NEW}.diff
+  echo "Diffing release-${OLD}-${NEW}.diff"
+  #echo "Diffing release-${base}-${NEW}.diff"
+  git diff --color=always --color-moved $OLD $NEW -U20 > release-${OLD}-${NEW}.diff
+  #git diff --color=always --color-moved $base $NEW -U20 > release-${base}-${NEW}.diff
   #git diff --color=always --color-moved -G${GREP_LINE} $OLD $NEW -U20 > release-${OLD}-${NEW}-G.diff
 fi
 
@@ -79,7 +79,9 @@ GREP_LINE="$(join_by \| ${KEYWORDS[@]})"
 export GREP_COLOR="05;37;41"
 
 # XXX: Arg this sometimes misses file context
-egrep -A40 -B40 --color=always "${GREP_LINE}" release-${base}-${NEW}.diff > keywords-${base}-${NEW}-$SCOPE.diff
+#egrep -A40 -B40 --color=always "${GREP_LINE}" release-${base}-${NEW}.diff > keywords-${base}-${NEW}-$SCOPE.diff
+egrep -A40 -B40 --color=always "${GREP_LINE}" release-${OLD}-${NEW}.diff > keywords-${OLD}-${NEW}-$SCOPE.diff
 
 echo "Diff generated. View it with:"
-echo "  less -R $REPO_DIR/keywords-$base-$NEW-$SCOPE.diff"
+#echo "  less -R $REPO_DIR/keywords-$base-$NEW-$SCOPE.diff"
+echo "  less -R $REPO_DIR/keywords-$OLD-$NEW-$SCOPE.diff"



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits