[PATCH 02/10] dim: Autocheck for up-to-dateness

Daniel Vetter daniel.vetter at ffwll.ch
Tue Oct 18 12:13:48 UTC 2016


Exits script to annoy people roughly every 100th time ...

Also switch to the magic @{upstream} reference, in case the remote is
not called origin (which is pretty normal in case of using git
worktree).

Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 dim | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dim b/dim
index 57ad4fcf9767..192d6ee10838 100755
--- a/dim
+++ b/dim
@@ -176,13 +176,17 @@ function dim_uptodate
 		exit 1
 	fi
 
-	if ! git --git-dir=$DIM_PREFIX/maintainer-tools/.git show origin/maintainer-tools:dim |\
+	if ! git --git-dir=$DIM_PREFIX/maintainer-tools/.git show @{upstream}:dim |\
 			diff "$using" - >& /dev/null; then
 		echo "$dim: not running upstream version of the script." >&2
 		exit 1
 	fi
 }
 
+if [[ "$((`date +%s` % 100))" -eq "0" ]] ; then
+        dim_uptodate
+fi
+
 # get message id from file
 # $1 = file
 message_get_id ()
-- 
2.9.3



More information about the dri-devel mailing list