]> git.ipfire.org Git - thirdparty/git.git/commitdiff
environ: GIT_FLUSH should be made a usual Boolean
authorJunio C Hamano <gitster@pobox.com>
Thu, 15 Sep 2022 16:06:57 +0000 (09:06 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Sep 2022 18:34:51 +0000 (11:34 -0700)
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 <gitster@pobox.com>
Documentation/git.txt
write-or-die.c

index 00ab9d7978f905c1949f3db35e051e2a20c69257..8159a4b3a4248ebaafde6d539637edbb660df635 100644 (file)
@@ -705,6 +705,7 @@ for further details.
        waiting for someone with sufficient permissions to fix it.
 
 `GIT_FLUSH`::
+// NEEDSWORK: make it into a usual Boolean environment variable
        If this environment variable is set to "1", then commands such
        as 'git blame' (in incremental mode), 'git rev-list', 'git log',
        'git check-attr' and 'git check-ignore' will
index c4fd91b5b4308aa13cc8e2407df1e826470f54dd..aaa0318e8248116af4d14143eace6c34e59d730b 100644 (file)
@@ -23,6 +23,7 @@ void maybe_flush_or_die(FILE *f, const char *desc)
 
        if (f == stdout) {
                if (skip_stdout_flush < 0) {
+                       /* NEEDSWORK: make this a normal Boolean */
                        cp = getenv("GIT_FLUSH");
                        if (cp)
                                skip_stdout_flush = (atoi(cp) == 0);