author | Johannes Sixt <j6t@kdbg.org> | |
Mon, 6 Jun 2011 07:06:02 +0000 (09:06 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 6 Jun 2011 18:35:06 +0000 (11:35 -0700) | ||
commit | 06bc4b796ad69ba93f0a8c451368602e0553c2d3 | |
tree | c3134457df1903f61b973273f0e0114f544afa83 | tree | snapshot |
parent | 8c92516f2dae4778e2b5a41196f7409823283e4b | commit | diff |
mingw.c: move definition of mingw_getenv down
We want to use static lookup_env() in a subsequent change.
At first sight, this change looks innocent. But it is not due to the
#undef getenv. There is one caller of getenv between the old location and
the new location whose behavior could change. But as can be seen from the
defintion of mingw_getenv, the behavior for this caller does not change
substantially.
To ensure consistent behavior in the future, change all getenv callers
in mingw.c to use mingw_getenv.
With this patch, this is not a big deal, yet, but with the subsequent
change, where we teach getenv to do a case-sensitive lookup, the behavior
of all call sites is changed.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We want to use static lookup_env() in a subsequent change.
At first sight, this change looks innocent. But it is not due to the
#undef getenv. There is one caller of getenv between the old location and
the new location whose behavior could change. But as can be seen from the
defintion of mingw_getenv, the behavior for this caller does not change
substantially.
To ensure consistent behavior in the future, change all getenv callers
in mingw.c to use mingw_getenv.
With this patch, this is not a big deal, yet, but with the subsequent
change, where we teach getenv to do a case-sensitive lookup, the behavior
of all call sites is changed.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c | diff | blob | history |