Re: [PATCH v2 3/3] sequencer: allow the commit-msg hooks to run during a `reword`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 23, 2017, 16:51 UTC
- Message-ID
- <xmqq60j0ey1k.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <315c237eb50572f8e109ea547a2010d9f81c3aff.1490285210.git.johannes.schindelin@gmx.de>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
Show 6 quoted lines
> @@ -996,6 +998,8 @@ static int do_pick_commit(enum todo_command command, struct commit *commit, > if (res || command != TODO_REWORD) > goto leave; > flags |= EDIT_MSG | AMEND_MSG; > + if (command == TODO_REWORD) > + flags |= VERIFY_MSG;
Good. This looks even cleaner than what we discussed during the review of the previous round. After deciding not to return early, we set the default set of features in flags and then further add verify-msg in when needed. Much easier to understand.