From 388dcc05170a3b9b31c4975f8ba1bf090c99d0ec Mon Sep 17 00:00:00 2001
From: "Ian H. Pittwood" <pittwoodian@gmail.com>
Date: Tue, 10 Mar 2020 13:18:15 -0500
Subject: [PATCH] Target test files only in git diff check

Change-Id: I758636bc1669c1618b41db9e672664fedfc7b65a
Co-Authored-By: Francis Yi <francisyi19@gmail.com>
Co-Authored-By: Ian Pittwood <pittwoodian@gmail.com>
---
 tools/git_diff_check | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/git_diff_check b/tools/git_diff_check
index 8e6b2511e..98454c1ba 100755
--- a/tools/git_diff_check
+++ b/tools/git_diff_check
@@ -16,7 +16,7 @@
 git update-index -q --ignore-submodules --refresh
 
 # Evaluate git files for difference, if found print message and fail.
-git diff-files --quiet --ignore-submodules
+git diff-files --quiet --ignore-submodules **/*.golden
 if [ $? -ne 0 ]
 then
     echo "git diff found modified test cases, please run make update-golden"
@@ -24,7 +24,7 @@ then
 fi
 
 # Evaluate git index for differences, if found print message and fail.
-git diff-index --cached --quiet --ignore-submodules HEAD --
+git diff-index --cached --quiet --ignore-submodules HEAD -- **/*.golden
 if [ $? -ne 0 ]
 then
     echo "git diff found modified test cases, please run make update-golden"