builtin/commit.c: reduce scope of variables