rebase -i -p: handle index and workdir correctly