gpick: fix dropping commits off the end of the branch


firstly, don't run off the end of the new commit list if it's simply
shorter than the old commit list.
secondly, don't declare that there is nothing to do when the new list is
shorter than the old one.
thirdly, handle the newly arising situation that we might actually need
to write a rebase-todo file that deletes all commits on top of the
determined base.
lastly, given the last clause, remove the special case that forbids
dropping all commits, because it's actually not special any more.

amends 351e37ab.

Fixes: QTQAINFRA-3674
Change-Id: Ib982f563a190877e603404f852e2a23b2a75243c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
commit853cc2286f0058c94f833c47d830a304de3e59c9
parent95b3891cba8be212f6c8cf82d911c553e7c72d7d
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>
committerOswald Buddenhagen <oswald.buddenhagen@gmx.de>
commit timeMon, 20 Apr 2020 15:14:52 +0000