Rubén Justo <rjusto@xxxxxxxxx> writes: > On 11-ene-2024 17:21:22, Junio C Hamano wrote: >> Rubén Justo <rjusto@xxxxxxxxx> writes: >> >> > [ ... ] >> > diff --git a/advice.h b/advice.h >> > index 0f584163f5..2affbe1426 100644 >> > --- a/advice.h >> > +++ b/advice.h >> > @@ -49,6 +49,7 @@ struct string_list; >> > ADVICE_UPDATE_SPARSE_PATH, >> > ADVICE_WAITING_FOR_EDITOR, >> > ADVICE_SKIPPED_CHERRY_PICKS, >> > + ADVICE_WORKTREE_ADD_ORPHAN, >> > }; >> > >> > Note the hunk header, instead of a much more expected: >> > >> > @@ -49,6 +49,7 @@ enum advice_type >> >> Next time, don't include "diff" output in the proposed log message >> without indenting. It makes it hard to read and parse. > > My fault. Sorry. > > Is there any way to make git-format-patch issue a warning or refuse to > continue when the resulting patch is not going to be accepted by git-am? I meant it as primarily to help human readers, but you are right, it will break "am". How about doing it in the pre-commit hook?