Fixed a segmentation fault happening in next-rev.sh

...s causing seg fault.

The seg fault happens when the git log has the following structure:

|
* commit 75980
|
|     Some message 1
|
* commit ed369
|
|     Some message 2
|
* commit 4e900
|
|     Some message 3
|
*   commit 860f4
|\  Merge: 56a231b cc6068c
| |
| |     Merge branch 'xxxx' of yyyy into zzzz
| |
| * commit c7cb8
| |
| |     Some message 4
| |
* | commit 7951d
|/  Author:
|   Date:
|

And the bisect call in next-rev.sh looks like:
    bisect 75980^ ^7951d

So to repro segmentation fault, one can issue the following command-line:
    git rev-list --first-parent --bisect-all 75980^ ^7951d --

(Please replace truncated hash IDs with full hash IDs everywhere.)