contrib: findfix: Simplify checkbranch()

Reduce indentation level by returning immediately if no commits
are found in the search range. Due to reduced indentation this also
lets us print a message directly without violating column length
instead of assigning it to a variable and printing it.

Return immediately if a matching commit is found.

Change-Id: I5a41a8046a1f3cf2d405f61f8a133afe2b9a6d80
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/5078396
Tested-by: Guenter Roeck <groeck@chromium.org>
Commit-Queue: Zubin Mithra <zsm@chromium.org>
Reviewed-by: Zubin Mithra <zsm@chromium.org>
Auto-Submit: Guenter Roeck <groeck@chromium.org>
1 file changed