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