builtin-revert.c: release index lock when cherry-picking an empty commit