aboutsummaryrefslogtreecommitdiff
path: root/git-gui/lib/diff.tcl
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-02-10 13:45:17 +0100
committerPatrick Steinhardt <ps@pks.im>2026-02-17 06:58:00 +0100
commit31d235c4c72666dec71a104d3bcd37cc7bd71ec5 (patch)
tree6334cbe4d7187d78bfbbbd30ef18b35556b7e530 /git-gui/lib/diff.tcl
parent1a729ccb930f3c3e206117aeb4f536c9864e09c9 (diff)
downloadgit-31d235c4c72666dec71a104d3bcd37cc7bd71ec5.tar.xz
git-gui: fix use of GIT_CEILING_DIRECTORIES
The GIT-VERSION-GEN script sets up GIT_CEILING_DIRECTORIES so that we won't accidentally parse version information from an unrelated parent repository. The ceiling is derived from the source directory by simply appendign "/.." to it, which mean that we'll only consider the current directory for repository discovery. This works alright in the case where git-gui is built as a standalone project, but it breaks when git-gui is embedded into a _related_ parent project. This is for example how git-gui is distributed via Git. Interestingly enough, the version information is still derived properly when building git-gui via Git's Makefile. In that case we eventually end up specifying the ceiling directory as "./.." as we use relative paths there, and that seems to not restrict the repository discovery. But when building via Meson we specify the source directory as an absolute path, and if so the repository discovery _is_ stopped. The consequence is that we won't be able to derive the version in that case. Fix the issue by adding a new optional parameter to GIT-VERSION-GEN that allows the caller to override the parent project directory and wire up new build options for Meson and Make that allows users to specify it. Note that by default we won't set the parent project directory. This isn't required for Meson anyway as we already use absolute paths there, but for our Makefile it means that we still end up with "./.." as ceiling directory, which is ineffective. But using e.g. pwd(1) as the default value would break downstream's version generation, unless we updated git-gui and the Makefile at the same point in time. Signed-off-by: Patrick Steinhardt <ps@pks.im>
Diffstat (limited to 'git-gui/lib/diff.tcl')
0 files changed, 0 insertions, 0 deletions