git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] ci: only warn about perforce/git-lfs/JGit on platforms that need them

From
Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com>
Date
Sep 12, 2026, 14:38 UTC
Message-ID
<pull.2403.git.git.1789223882471.gitgitgadget@gmail.com>
From: Harald Nordgren <haraldnordgren@gmail.com>

perforce, git-lfs, and JGit test git's own interop code, not anything platform-specific, so installing them once on ubuntu-* (all three) and macos-* (perforce) is enough coverage. debian, i386/ubuntu, alpine, fedora and almalinux never install them, yet the presence check at the end of the script warned on all of them anyway.

Scope each check to the platforms that attempt the install, so a warning means one actually failed.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
---
    ci: only warn about perforce/git-lfs/JGit on platforms that need them
    
    Only warn about a missing perforce/git-lfs/JGit install on the platforms
    that actually need and attempt them (ubuntu-*, plus macOS for perforce),
    since every other platform never installs them and was warning
    regardless.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2403%2FHaraldNordgren%2Fci-scope-optional-tool-warnings-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2403/HaraldNordgren/ci-scope-optional-tool-warnings-v1
Pull-Request: https://github.com/git/git/pull/2403
 ci/install-dependencies.sh | 54 ++++++++++++++++++++++----------------
 1 file changed, 31 insertions(+), 23 deletions(-)
diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 2f61fbb07c..a68cec64b4 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -171,30 +171,38 @@ Documentation)
 	;;
 esac
 
-if type p4d >/dev/null 2>&1 && type p4 >/dev/null 2>&1
-then
-	echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
-	p4d -V
-	echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
-	p4 -V
-else
-	echo >&2 "::warning:: perforce wasn't installed, see above for clues why"
-fi
+case "$distro" in
+ubuntu-*|macos-*)
+	if type p4d >/dev/null 2>&1 && type p4 >/dev/null 2>&1
+	then
+		echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
+		p4d -V
+		echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
+		p4 -V
+	else
+		echo >&2 "::warning:: perforce wasn't installed, see above for clues why"
+	fi
+	;;
+esac
 
-if type git-lfs >/dev/null 2>&1
-then
-	echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"
-	git-lfs version
-else
-	echo >&2 "::warning:: git-lfs wasn't installed, see above for clues why"
-fi
+case "$distro" in
+ubuntu-*)
+	if type git-lfs >/dev/null 2>&1
+	then
+		echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"
+		git-lfs version
+	else
+		echo >&2 "::warning:: git-lfs wasn't installed, see above for clues why"
+	fi
 
-if type jgit >/dev/null 2>&1
-then
-	echo "$(tput setaf 6)JGit Version$(tput sgr0)"
-	jgit version
-else
-	echo >&2 "::warning:: JGit wasn't installed, see above for clues why"
-fi
+	if type jgit >/dev/null 2>&1
+	then
+		echo "$(tput setaf 6)JGit Version$(tput sgr0)"
+		jgit version
+	else
+		echo >&2 "::warning:: JGit wasn't installed, see above for clues why"
+	fi
+	;;
+esac
 
 end_group "Install dependencies"

base-commit: 47ce80527c56f462cb97db4ca8125342204d3783
-- 
gitgitgadget
Next: Junio C Hamano
Message 1 of 29 in “ci: only warn about perforce/git-lfs/JGit on platforms that need them”
  1. ci: only warn about perforce/git-lfs/JGit on platforms that need themHarald Nordgren via GitGitGadget, Sep 12, 2026
  2. Junio C HamanoSep 25, 2026
  3. Patrick SteinhardtSep 28, 2026
  4. Harald NordgrenSep 28, 2026
  5. ci: fail the build if perforce, git-lfs, or JGit fail to installHarald Nordgren via GitGitGadget, Oct 23, 2026
  6. Junio C HamanoOct 23, 2026
  7. Harald NordgrenOct 23, 2026
  8. Junio C HamanoOct 23, 2026
  9. Patrick SteinhardtOct 26, 2026
  10. Harald NordgrenOct 26, 2026
  11. Harald NordgrenOct 26, 2026
  12. Patrick SteinhardtOct 26, 2026
  13. Harald NordgrenOct 26, 2026
  14. Patrick SteinhardtOct 26, 2026
  15. Harald NordgrenOct 26, 2026
  16. Patrick SteinhardtOct 26, 2026
  17. 0/2 ci: fail the build if perforce, git-lfs or JGit fail to installHarald Nordgren via GitGitGadget, Oct 26, 2026
  18. 1/2 ci: drop quarantine removal for macos perforce binariesHarald Nordgren via GitGitGadget, Oct 26, 2026
  19. Patrick SteinhardtOct 26, 2026
  20. Harald NordgrenOct 26, 2026
  21. Harald NordgrenOct 26, 2026
  22. Junio C HamanoOct 26, 2026
  23. 2/2 ci: fail the build if perforce, git-lfs, or JGit fail to installHarald Nordgren via GitGitGadget, Oct 26, 2026
  24. Patrick SteinhardtOct 26, 2026
  25. Harald NordgrenOct 26, 2026
  26. 0/2 ci: fail the build if perforce, git-lfs or JGit fail to installHarald Nordgren via GitGitGadget, Oct 27, 2026
  27. 1/2 ci: drop quarantine removal for macos perforce binariesHarald Nordgren via GitGitGadget, Oct 27, 2026
  28. 2/2 ci: fail the build if perforce, git-lfs, or JGit fail to installHarald Nordgren via GitGitGadget, Oct 27, 2026
  29. Patrick SteinhardtOct 27, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.