diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-05-15 12:17:59 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-05-15 12:57:01 +0200 |
commit | 14b1641d3e85e7713297fe8f65f42de2639c3ad0 (patch) | |
tree | f54f247c36eaf40bef2c1dd211d1ff528e804100 | |
parent | 01c88ffb3d5b6bb67f3116ef24aadbe7675bda41 (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-x | dim | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |