Skip to content

Commit fd01795

Browse files
committed
environ: GIT_FLUSH should be made a usual Boolean
This uses atoi() and checks if the result is not zero to decide what to do. Turning it into the usual Boolean environment variable to use git_env_bool() would not break those who have been using "set to 0, or set to non-zero, that can be parsed with atoi()" values, but will match the expectation of those who expected "true" to mean "yes". Signed-off-by: Junio C Hamano <[email protected]>
1 parent 80f0b3f commit fd01795

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Documentation/git.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,7 @@ for further details.
705705
waiting for someone with sufficient permissions to fix it.
706706

707707
`GIT_FLUSH`::
708+
// NEEDSWORK: make it into a usual Boolean environment variable
708709
If this environment variable is set to "1", then commands such
709710
as 'git blame' (in incremental mode), 'git rev-list', 'git log',
710711
'git check-attr' and 'git check-ignore' will

write-or-die.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ void maybe_flush_or_die(FILE *f, const char *desc)
2323

2424
if (f == stdout) {
2525
if (skip_stdout_flush < 0) {
26+
/* NEEDSWORK: make this a normal Boolean */
2627
cp = getenv("GIT_FLUSH");
2728
if (cp)
2829
skip_stdout_flush = (atoi(cp) == 0);

0 commit comments

Comments
 (0)