Re: [PATCH v2 7/7] strbuf: remove environment variables
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 3, 2023, 19:24 UTC
- Message-ID
- <xmqqednxqkun.fsf@gitster.g>
- In-Reply-To
- <20230503185031.1810078-7-calvinwan@google.com>
Calvin Wan <calvinwan@google.com> writes:
> As a library that only interacts with other primitives, strbuf should > not directly access environment variables within its
"environment variables" is a misnomer, as there is no getenv() removed by this patch.
strbuf: stop depending on global 'comment_line_char'
or something is what you meant, I think. This patch is about only one single variable, not about many environment variables, right?
> functions. Therefore, add an additional variable to function signatures
These things that are enclosed in a pair of () after the function definition are usually called parameters.
> for functions that use an environment variable and refactor callers to > pass in the environment variable.
Likewise.
> - strbuf_commented_addf(&buf, _(tag_template), tag, comment_line_char); > + strbuf_commented_addf(&buf, comment_line_char, > + _(tag_template), tag,comment_line_char);
Style?