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]>
Signed-off-by: Daniel Vetter <[email protected]>
---
 dim | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dim b/dim
index b4e46c698345..3647d7168a36 100755
--- a/dim
+++ b/dim
@@ -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. "
-- 
2.14.1

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

Reply via email to