git/builtin
Johannes Schindelin 6c91162449 fetch: avoid unnecessary work when there is no current branch
As pointed out by CodeQL, `branch_get()` may return `NULL`, in which
case `branch_has_merge_config()` would return early, but we can even
avoid enumerating the refs prefixes in that case, saving even more CPU
cycles.

Technically, we should enclose these two statements in an `if (branch)
{...}` block, but the indentation is already quite deep, therefore I
refrained from doing that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-05-15 13:46:47 -07:00
..
2024-12-13 07:33:36 -08:00
2025-05-12 14:22:49 -07:00
2025-05-15 13:46:44 -07:00
2025-01-28 13:02:22 -08:00
2025-05-12 14:22:49 -07:00
2024-12-18 10:44:30 -08:00
2025-05-12 14:22:49 -07:00
2024-12-18 10:44:31 -08:00
2025-05-08 12:36:32 -07:00
2025-02-04 09:51:41 -08:00
2025-03-29 01:04:40 -07:00
2025-04-24 17:25:34 -07:00
2024-12-18 10:44:30 -08:00
2025-01-28 13:02:22 -08:00