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

[PATCH 4/6] git-instaweb: unconditionally assume that gitweb is mod_perl capable

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Oct 21, 2021, 19:57 UTC
Message-ID
<patch-4.6-4feeeb12aca-20211021T195538Z-avarab@gmail.com>
In-Reply-To
<cover-0.6-00000000000-20211021T195538Z-avarab@gmail.com>

Remove a check for whether mod_perl is a supported mode of gitweb.cgi added in a51d37c1df6 (Add git-instaweb, instantly browse the working repo with gitweb, 2006-07-01).

The reason for the check was to support users who had a newer version of git and an older version of gitweb, it was then subsequently adjusted for changes in the script in f0e588dffc1 (git-instaweb: fix mod_perl detection for apache2, 2009-08-08).

It's a fair bet that nobody's running a git from 2021 and gitweb from pre-2007 anymore, so we can unconditionally assume that this will be supported by gitweb.cgi.

This allows a subsequent commit to remove the sane_grep() wrapper, this change is split up from that since this is the only case where the "grep" invocation could be removed entirely.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 git-instaweb.sh | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 7c55229773e..54094fbe8de 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -380,10 +380,7 @@ TypesConfig "$fqgitdir/mime.types"
 DirectoryIndex gitweb.cgi
 EOF
 
-	# check to see if Dennis Stosberg's mod_perl compatibility patch
-	# (<20060621130708.Gcbc6e5c@leonov.stosberg.net>) has been applied
-	if test -f "$module_path/mod_perl.so" &&
-	   sane_grep 'MOD_PERL' "$root/gitweb.cgi" >/dev/null
+	if test -f "$module_path/mod_perl.so"
 	then
 		# favor mod_perl if available
 		cat >> "$conf" <<EOF
-- 
2.33.1.1494.g88b39a443e1
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 6 of 15 in “Makefile: be less eager to re-build, *.sh code cleanups”
  1. 0/6 Makefile: be less eager to re-build, *.sh code cleanupsÆvar Arnfjörð Bjarmason, Oct 21, 2021
  2. 1/6 Makefile: move git-SCRIPT-DEFINES adjacent to $(SCRIPT_DEFINES)Ævar Arnfjörð Bjarmason, Oct 21, 2021
  3. 2/6 Makefile: remove $(GIT_VERSION) from $(SCRIPT_DEFINES)Ævar Arnfjörð Bjarmason, Oct 21, 2021
  4. Jeff KingOct 25, 2021
  5. 3/6 Makefile: remove $(NO_CURL) from $(SCRIPT_DEFINES)Ævar Arnfjörð Bjarmason, Oct 21, 2021
  6. 4/6 git-instaweb: unconditionally assume that gitweb is mod_perl capableÆvar Arnfjörð Bjarmason, Oct 21, 2021
  7. 5/6 git-sh-setup: remove unused sane_egrep() functionÆvar Arnfjörð Bjarmason, Oct 21, 2021
  8. Junio C HamanoOct 22, 2021
  9. 6/6 git-sh-setup: remove "sane_grep", it's not needed anymoreÆvar Arnfjörð Bjarmason, Oct 21, 2021
  10. Junio C HamanoOct 21, 2021
  11. Johannes SchindelinOct 22, 2021
  12. Junio C HamanoOct 24, 2021
  13. Johannes SchindelinOct 25, 2021
  14. Junio C HamanoOct 25, 2021
  15. Jeff KingOct 25, 2021

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.