diff options
| author | Derrick Stolee <stolee@gmail.com> | 2026-02-23 12:26:52 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-23 13:23:41 -0800 |
| commit | db45e4908d6711ddc3094cb079c85278691c8267 (patch) | |
| tree | 1d9f809d42a599a62bf21320db042a32eb518893 /contrib/persistent-https | |
| parent | 9cb4a5e1ba3e586e77b1c026d509f284b4c55764 (diff) | |
| download | git-db45e4908d6711ddc3094cb079c85278691c8267.tar.gz git-db45e4908d6711ddc3094cb079c85278691c8267.zip | |
color: add color_parse_quietly()
When parsing colors, a failed parse leads to an error message due to the
result returning error(). To allow for quiet parsing, create
color_parse_quietly(). This is in contrast to an ..._gently() version
because the original does not die(), so both options are technically
'gentle'.
To accomplish this, convert the implementation of color_parse_mem() into
a static color_parse_mem_1() helper that adds a 'quiet' parameter. The
color_parse_quietly() method can then use this. Since it is a near
equivalent to color_parse(), move that method down in the file so they
can be nearby while also appearing after color_parse_mem_1().
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
