Commit b517c451 authored by Matthew Finkel's avatar Matthew Finkel
Browse files

Use specified commit in audit, not merge-base

parent d317676d
...@@ -57,15 +57,15 @@ cd $REPO_DIR ...@@ -57,15 +57,15 @@ cd $REPO_DIR
#function join_by { local d=$1; shift; local f=$1; shift; printf %s "$f" "${@/#/ $d}"; } #function join_by { local d=$1; shift; local f=$1; shift; printf %s "$f" "${@/#/ $d}"; }
#GREP_LINE="$(join_by \-G ${KEYWORDS[@]})" #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-${OLD}-${NEW}.diff" ];
if [ ! -f "release-${base}-${NEW}.diff" ]; #if [ ! -f "release-${base}-${NEW}.diff" ];
then then
#echo "Diffing release-${OLD}-${NEW}.diff" echo "Diffing release-${OLD}-${NEW}.diff"
echo "Diffing release-${base}-${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 $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 $base $NEW -U20 > release-${base}-${NEW}.diff
#git diff --color=always --color-moved -G${GREP_LINE} $OLD $NEW -U20 > release-${OLD}-${NEW}-G.diff #git diff --color=always --color-moved -G${GREP_LINE} $OLD $NEW -U20 > release-${OLD}-${NEW}-G.diff
fi fi
...@@ -79,7 +79,9 @@ GREP_LINE="$(join_by \| ${KEYWORDS[@]})" ...@@ -79,7 +79,9 @@ GREP_LINE="$(join_by \| ${KEYWORDS[@]})"
export GREP_COLOR="05;37;41" export GREP_COLOR="05;37;41"
# XXX: Arg this sometimes misses file context # 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 "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"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment