build: only abort 'git am' or 'git rebase' if really active