[PATCH] dim: check for empty pulls
Daniel Vetter
daniel.vetter at ffwll.ch
Tue May 15 10:19:01 UTC 2018
This could be a parsing error of the pull (for all the people who
don't use a script like dim pull-request to make sure all the silly
details are right), or some confusion on the part of the sender, or
something else.
Either way not good to continue.
Cc: Dave Airlie <airlied at gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
dim | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dim b/dim
index 9ec43df08c4a..65f793a19380 100755
--- a/dim
+++ b/dim
@@ -939,6 +939,10 @@ function dim_apply_pull
echo Pulling $pull_branch ...
git fetch $pull_branch
+ if [[ $(git rev-list HEAD..FETCH_HEAD | wc -l) -eq 0 ]] ; then
+ warn_or_fail "Nothing in the pull request"
+ fi
+
checkpatch_commit_push_range "HEAD..FETCH_HEAD"
if ! $DRY git pull $pull_branch ; then
--
2.17.0
More information about the dim-tools
mailing list