Repair `stg repair` with amended first patch
When `stg repair` searches for commits to "patchify", it looks for
commits that are children of known patch commits. This left an unhandled
edge case where if only one patch was applied, and that patch was
amended with `git commit --amend`, the amended commit would not be
patchified and, worse, that commit would become orphaned.
`stg repair` is modified to look for the last known stack base commit in
addition to known patch commits such that children of the base commit
will now be patchified.
An added benefit of identifying the stack's base commit is that it
signals the point beyond which no patches will be found and thus allows
searching to stop and a potentially large amount of work avoided. This
can have a significant impact on the performance of running `stg repair`
in a repositories with long histories.
Repairs #163
Signed-off-by: Peter Grayson <pete@jpgrayson.net>