Skip to contentSkip to conversation

dim: robustify drm-rerere update logic

PATCH New Daniel Vetter 1 participant 1 message Sep 8, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dim: robustify drm-rerere update logic

We've now had two reports (from Chris and Sean each one) that dim stumbled over uncommitted state in drm-rerere/. In both cases a bunch of git rm have been staged, but not committed.

I didn't really figure out what exactly happend, but best explanation is that one of the commands failed, but silently, since we &> /dev/null the output. Make sure no matter what happens, we get at least to the commit step to not leave a broken state behind and add a || true everywhere it's missing.

Cc Chris Wilson <[email protected]>
Cc Sean Paul <[email protected]>
---
 dim | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
dim +2 -2
index b4e46c698345..3647d7168a36 100755
@@ -542,10 +542,10 @@ function commit_rerere_cache
 		git add ./*.patch >& /dev/null || true
 		for file  in $(git ls-files); do
 			if ! git log --since="60 days ago" --name-only -- $file | grep $file &> /dev/null; then
-				git rm $file &> /dev/null
+				git rm $file &> /dev/null || true
 			fi
 		done
-		find rr-cache/ -mtime -1 -type f -not -name "thisimage*" -print0 | xargs -0 git add > /dev/null
+		find rr-cache/ -mtime -1 -type f -not -name "thisimage*" -print0 | xargs -0 git add > /dev/null || true
 		git rm rr-cache/rr-cache &> /dev/null || true
 		if git commit -m "$time: $integration_branch rerere cache update" >& /dev/null; then
 			echo -n "New commit. "
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx