git/builtin
Junio C Hamano 4933910ab7 mailinfo: handle_commit_msg() shouldn't be called after finding patchbreak
There is a strange "if (!mi->cmitmsg) return 0" at the very beginning
of handle_commit_msg(), but the condition should never trigger, because:

 * The only place cmitmsg is set to NULL is after this function sees
   a patch break, closes the FILE * to write the commit log message
   and returns 1.  This function returns non-zero only from that
   codepath.

 * The caller of this function, upon seeing a non-zero return,
   increments filter_stage, starts treating the input as patch text
   and will never call handle_commit_msg() again.

Replace it with an assert(!mi->filter_stage) to ensure the above
observation will stay to be true.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-21 15:57:17 -07:00
..
2014-07-16 11:10:11 -07:00
2015-09-28 19:16:54 -07:00
2015-08-24 13:09:02 -07:00
2015-01-14 09:32:04 -08:00
2015-08-31 15:39:10 -07:00
2015-08-25 14:57:09 -07:00
2015-03-20 13:11:53 -07:00
2015-08-25 13:11:21 -07:00
2015-09-28 15:28:31 -07:00
2015-09-28 14:57:10 -07:00
2015-01-14 09:32:04 -08:00
2015-08-31 15:39:05 -07:00
2015-07-13 14:02:02 -07:00
2015-08-03 11:01:10 -07:00
2015-09-28 19:16:54 -07:00
2015-01-14 09:32:04 -08:00
2015-09-09 14:30:35 -07:00
2015-08-31 15:39:03 -07:00