]> git.ipfire.org Git - thirdparty/git.git/commit
gitk: treat file names beginning with "|" as relative paths
authorJohannes Sixt <j6t@kdbg.org>
Mon, 17 Mar 2025 19:36:04 +0000 (20:36 +0100)
committerTaylor Blau <me@ttaylorr.com>
Fri, 23 May 2025 21:03:30 +0000 (17:03 -0400)
commitb966b738e1923badc788b9111cc81653b50ff164
treeb8ee1c60fab44e178e250c552927410f0cf88755
parent465f03869ae11acd04abfa1b83c67879c867410c
gitk: treat file names beginning with "|" as relative paths

The Tcl 'open' function has a vary wide interface. It can open files as
well as pipes to external processes. The difference is made only by the
first character of the file name: if it is "|", an process is spawned.

We have a number of calls of Tcl 'open' that take a file name from the
environment in which Gitk is running. Be prepared that insane values are
injected. In particular, when we intend to open a file, do not mistake
a file name that happens to begin with "|" as a request to run a process.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
gitk