summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2018-05-15 12:17:59 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2018-05-15 12:57:01 +0200
commit14b1641d3e85e7713297fe8f65f42de2639c3ad0 (patch)
treef54f247c36eaf40bef2c1dd211d1ff528e804100
parent01c88ffb3d5b6bb67f3116ef24aadbe7675bda41 (diff)
dim: check for empty pulls
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. v2: Use -z and drop the wc -l (Jani). Cc: Dave Airlie <airlied@gmail.com> Acked-by: Jani Nikula <jani.nikula@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
-rwxr-xr-xdim4
1 files changed, 4 insertions, 0 deletions
diff --git a/dim b/dim
index 29801b910481..09e9e91e9eb2 100755
--- a/dim
+++ b/dim
@@ -939,6 +939,10 @@ function dim_apply_pull
echo Pulling $pull_branch ...
git fetch $pull_branch
+ if [[ -z "$(git rev-list HEAD..FETCH_HEAD)" ]] ; then
+ warn_or_fail "Nothing in the pull request"
+ fi
+
checkpatch_commit_push_range "HEAD..FETCH_HEAD"
if ! $DRY git pull $pull_branch ; then