Repository navigation
Conversation
Add --with-git=auto|yes|no|PATH. Default is auto; no disables
all Git usage; yes fails hard if Git is missing. A non-zero
exit from `git --version` is treated as "not usable" and
falls back to auto.
Previously, configure.php unconditionally invoked Git, which
fails in environments that do not provide it by default. The
exit status (127) was then tested for failure and the script
stopped with the following diagnostic (shortened):
configure.php on PHP 8.5.13, libxml 2.9.14
...
sh: 1: git: not found
doc-base/temp clean up FAILED.
git_clean() only ever cleans temp/, which is committed via
temp/.keep and is empty in fresh checkouts. The cleanup is
therefore not required for reproducibility in Dockerfile
ADD-based and similar builds, but kept for environments that
do use Git (e.g. local working trees or manual clones).
The Git dependency is now explicit and optional, controlled
entirely by --with-git.
Member
|
Instead of adding an option that disables git on The logic behind using In |
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.
Add
--with-git=auto|yes|no|PATH. Default isauto;nodisables all Git usage;yesfails hard if Git is missing. A non-zero exit fromgit --versionis treated as "not usable" and falls back toauto.Previously, configure.php unconditionally invoked Git, which fails in environments that do not provide it by default. The exit status (127) was then tested for failure and the script stopped with the following diagnostic (shortened):
git_clean() only ever cleans temp/, which is committed via temp/.keep and is empty in fresh checkouts. The cleanup is therefore not required for reproducibility in Dockerfile ADD-based and similar builds, but kept for environments that do use Git (e.g. local working trees or manual clones).
The Git dependency is now explicit and optional, controlled entirely by
--with-git.To verify the behavior, I ran configure with and without a Git shim in
PATH, covering all four modes plus the explicit-path cases:/usr/bin/git--without-git--with-git/usr/bin/git--with-git=git/usr/bin/git--with-git=/usr/bin/git--with-git=auto/usr/bin/git--with-git=auto--with-git--with-git=/dev/null--with-git=/usr/bin/git--with-git=gotools/gitx