Open
Conversation
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 <[email protected]>
Meson detects the path of the target shell via `find_program("sh")`,
which essentially does a lookup via `PATH`. We know that almost all
systems have "/bin/sh" available though, which makes it the superior
choice as a default value.
Adapt `find_program()` to prefer "/bin/sh" over any other "sh"
executable.
Signed-off-by: Patrick Steinhardt <[email protected]>
In e749c87 (git-gui: provide question helper for retry fallback on Windows, 2025-08-28) we have introudced a new "git-gui--askyesno" helper script. While the script is conceptually similar to our existing helper script "git-gui--askpass", we don't massage it via "generate-script.sh". This means that build options like the path to the wish shell are not propagated correctly. Fix this issue. Signed-off-by: Patrick Steinhardt <[email protected]>
The new "git-gui--askyesno" helper script has only been wired up for our Makefile, not for Meson. Wire it up properly to bring both build systems on par with each other again. Signed-off-by: Patrick Steinhardt <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains a handful of fixes for Meson: