[PATCH] dim: check for empty pulls

Daniel Vetter daniel.vetter at ffwll.ch
Tue May 15 10:57:34 UTC 2018


On Tue, May 15, 2018 at 12:34 PM, Jani Nikula
<jani.nikula at linux.intel.com> wrote:
> On Tue, 15 May 2018, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
>> 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
>
> How about:
>
> if [[ -z "$(git rev-list HEAD..FETCH_HEAD)" ]]; then

Fixed and pushed with your irc ack.

Thanks, Daniel

>
> BR,
> Jani.
>
>> +             warn_or_fail "Nothing in the pull request"
>> +     fi
>> +
>>       checkpatch_commit_push_range "HEAD..FETCH_HEAD"
>>
>>       if ! $DRY git pull $pull_branch ; then
>
> --
> Jani Nikula, Intel Open Source Technology Center



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dim-tools mailing list