]> git.ipfire.org Git - thirdparty/git.git/commit - commit.c
commit: don't check for space twice when looking for header
authorRené Scharfe <l.s.r@web.de>
Sat, 25 Feb 2017 19:27:40 +0000 (20:27 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Feb 2017 19:20:18 +0000 (11:20 -0800)
commitb072504ce17564bcfd8cb82d6e3948720626065d
treec777abf13c9bc8ae1b28bbea18264c42f8abf6b0
parent50a01cc48c9a46fe75e4a014fb7847c2f4482406
commit: don't check for space twice when looking for header

Both standard_header_field() and excluded_header_field() check if
there's a space after the buffer that's handed to them.  We already
check in the caller if that space is present.  Don't bother calling
the functions if it's missing, as they are guaranteed to return 0 in
that case, and remove the now redundant checks from them.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.c