diff options
author | Taylor Blau <me@ttaylorr.com> | 2022-10-24 14:55:33 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-10-24 14:48:05 -0700 |
commit | 0b293df9642bc8731e45e636ef8f1c0c5749d4b2 (patch) | |
tree | 669f39930b3eb4f5bf800058b44341cf0751af45 /commit.c | |
parent | 251554c26931bec94e86d0e5740084d6116dd263 (diff) |
shortlog: make trailer insertion a noop when appropriate
When there are no trailers to insert, it is natural that
insert_records_from_trailers() should return without having done any
work.
But instead we guard this call unnecessarily by first checking whether
`log->groups` has the `SHORTLOG_GROUP_TRAILER` bit set.
Prepare to match a similar pattern in the future where a function which
inserts records of a certain type does no work when no specifiers
matching that type are given.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions