Avoid assumptions about number of parents of edit commit base

The rebase operation doesn't work well when the base is a root
commit, so bail in that case, as for some modification operations.
This is suboptimal but root commits are rare.

In other cases, iterate over parents instead of assuming there is one.

There are still places we assume an edit commit itself (as opposed to
its base) has a single parent. This assumption should still be safe.

Change-Id: I94f8165a77c0c2f183bd4b0d150174bfd2688ac8
2 files changed