]> git.ipfire.org Git - thirdparty/git.git/commit
git-gui: sanitize $PATH on all platforms
authorMark Levedahl <mlevedahl@gmail.com>
Fri, 11 Apr 2025 14:47:04 +0000 (10:47 -0400)
committerTaylor Blau <me@ttaylorr.com>
Fri, 23 May 2025 21:04:23 +0000 (17:04 -0400)
commit384b1409e8ba05bb908979a3f6aaa45bf93ac3c9
treef3047c267fc0a398baa945ecbf1aa6d8f63095f1
parent8fe7861c5185248a5786e87af71e29000cd4f214
git-gui: sanitize $PATH on all platforms

Since 8f23432b38d9 (windows: ignore empty `PATH` elements, 2022-11-23),
git-gui removes empty elements from $PATH, and a prior commit made this
remove all non-absolute elements from $PATH. But, this happens only on
Windows. Unsafe $PATH elements in $PATH are possible on all platforms.
Let's sanitize $PATH on all platforms to have consistent behavior. If a
user really wants the current repository on $PATH, they can add its
absolute name to $PATH.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
git-gui.sh