diff options
| author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2024-02-23 08:34:24 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-02-23 10:19:40 -0800 |
| commit | 5aca024a74e900bd9bc2c14a8e99494063ea4cc5 (patch) | |
| tree | ecbe991480dc8192c841abb243d4a174b0b38f68 /builtin/commit.c | |
| parent | Always check `parse_tree*()`'s return value (diff) | |
| download | git-5aca024a74e900bd9bc2c14a8e99494063ea4cc5.tar.gz git-5aca024a74e900bd9bc2c14a8e99494063ea4cc5.zip | |
cache-tree: avoid an unnecessary check
The first thing the `parse_tree()` function does is to return early if
the tree has already been parsed. Therefore we do not need to guard the
`parse_tree()` call behind a check of that flag.
As of time of writing, there are no other instances of this in Git's
code bases: whenever the `parsed` flag guards a `parse_tree()` call, it
guards more than just that call.
Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions
