[Intel-gfx] [dim PATCH] dim: use git ls-files file matching instead of grep

Jani Nikula jani.nikula at intel.com
Mon Oct 2 09:23:20 UTC 2017


Avoid extra pipelines for no good reason.

Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 dim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dim b/dim
index 678f34d5f7bd..d2f165893161 100755
--- a/dim
+++ b/dim
@@ -602,7 +602,7 @@ function commit_rerere_cache
 			return 1
 		fi
 		git add ./*.patch >& /dev/null || true
-		for file  in $(git ls-files | grep ^rr-cache); do
+		for file  in $(git ls-files -- rr-cache); do
 			if ! git log --since="60 days ago" --name-only -- $file | grep $file &> /dev/null; then
 				git rm $file &> /dev/null || true
 			fi
-- 
2.11.0



More information about the Intel-gfx mailing list