<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-instaweb.sh, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-01-10T23:27:52Z</updated>
<entry>
<title>instaweb: fix ip binding for the python http.server</title>
<updated>2025-01-10T23:27:52Z</updated>
<author>
<name>Alecs King</name>
<email>alecsk@gmail.com</email>
</author>
<published>2025-01-10T10:13:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=76baf97fa13c4109c335180b121140c8ba1bf97b'/>
<id>urn:sha1:76baf97fa13c4109c335180b121140c8ba1bf97b</id>
<content type='text'>
`git instaweb -d python` should bind the server to 0.0.0.0, while
`git instaweb -d python -l` should bind the server to 127.0.0.1.

The code had them backwards by mistake since 2eb14bb2d4
(git-instaweb: add Python builtin http.server support, 2019-01-28).

Signed-off-by: Alecs King &lt;alecsk@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Makefile: consistently use PERL_PATH</title>
<updated>2024-12-06T22:52:09Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-12-06T13:24:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c2a3b847eda3b51973998c1fa0a8749eb7e686b9'/>
<id>urn:sha1:c2a3b847eda3b51973998c1fa0a8749eb7e686b9</id>
<content type='text'>
When injecting the Perl path into our scripts we sometimes use '@PERL@'
while we othertimes use '@PERL_PATH@'. Refactor the code use the latter
consistently, which makes it easier to reuse the same logic for multiple
scripts.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Makefile: consistently use @PLACEHOLDER@ to substitute</title>
<updated>2024-12-06T22:52:08Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-12-06T13:24:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dbe46c0feb25417d01267bb97edb861694ed023d'/>
<id>urn:sha1:dbe46c0feb25417d01267bb97edb861694ed023d</id>
<content type='text'>
We have a bunch of placeholders in our scripts that we replace at build
time, for example by using sed(1). These placeholders come in three
different formats: @PLACEHOLDER@, @@PLACEHOLDER@@ and ++PLACEHOLDER++.

Next to being inconsistent it also creates a bit of a problem with
CMake, which only supports the first syntax in its `configure_file()`
function. To work around that we instead manually replace placeholders
via string operations, which is a hassle and removes safeguards that
CMake has to verify that we didn't forget to replace any placeholders.
Besides that, other build systems like Meson also support the CMake
syntax.

Unify our codebase to consistently use the syntax supported by such
build systems.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-instaweb: fix a typo</title>
<updated>2024-09-19T20:46:00Z</updated>
<author>
<name>Andrew Kreimer</name>
<email>algonell@gmail.com</email>
</author>
<published>2024-09-19T18:34:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bbe92166d42037cf9d0ef47931d343aac184489e'/>
<id>urn:sha1:bbe92166d42037cf9d0ef47931d343aac184489e</id>
<content type='text'>
Fix a typo in comments.

Signed-off-by: Andrew Kreimer &lt;algonell@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: switch links to https</title>
<updated>2023-11-26T01:07:05Z</updated>
<author>
<name>Josh Soref</name>
<email>jsoref@gmail.com</email>
</author>
<published>2023-11-24T03:35:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d05b08cd52cfda627f1d865bdfe6040a2c9521b5'/>
<id>urn:sha1:d05b08cd52cfda627f1d865bdfe6040a2c9521b5</id>
<content type='text'>
These sites offer https versions of their content.
Using the https versions provides some protection for users.

Signed-off-by: Josh Soref &lt;jsoref@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-sh-setup.sh: remove "say" function, change last users</title>
<updated>2022-06-28T20:13:18Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-06-28T10:05:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5b893f7d81eb7feb43662ed8663e2af76a76b4c8'/>
<id>urn:sha1:5b893f7d81eb7feb43662ed8663e2af76a76b4c8</id>
<content type='text'>
Remove the "say" function, with various rewrites of the remaining
git-*.sh code to C and the preceding change to have git-submodule.sh
stop using the GIT_QUIET variable there were only four uses in
git-subtree.sh. Let's have it use an "arg_quiet" variable instead, and
move the "say" function over to it.

The only other use was a trivial message in git-instaweb.sh, since it
has never supported the --quiet option (or similar) that code added in
0b624b4ceee (instaweb: restart server if already running, 2009-11-22)
can simply use "echo" instead.

The remaining in-tree hits from "say" are all for the sibling function
defined in t/test-lib.sh. It's safe to remove this function since it
has never been documented in Documentation/git-sh-setup.txt.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-sh-setup: remove "sane_grep", it's not needed anymore</title>
<updated>2021-10-21T23:17:57Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-10-21T19:58:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ebeb39faad6e3a67c31884c3dc6b76ce58b3f15b'/>
<id>urn:sha1:ebeb39faad6e3a67c31884c3dc6b76ce58b3f15b</id>
<content type='text'>
Remove the sane_grep() shell function in git-sh-setup. The two reasons
for why it existed don't apply anymore:

1. It was added due to GNU grep supporting GREP_OPTIONS. See
   e1622bfcbad (Protect scripted Porcelains from GREP_OPTIONS insanity,
   2009-11-23).

   Newer versions of GNU grep ignore that, but even on older versions
   its existence won't matter, none of these sane_grep() uses care
   about grep's output, they're merely using it to check if a string
   exists in a file or stream. We also don't care about the "LC_ALL=C"
   that "sane_grep" was using, these greps for fixed or ASCII strings
   will behave the same under any locale.

2. The SANE_TEXT_GREP added in 71b401032b9 (sane_grep: pass "-a" if
   grep accepts it, 2016-03-08) isn't needed either, none of these grep
   uses deal with binary data.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-instaweb: unconditionally assume that gitweb is mod_perl capable</title>
<updated>2021-10-21T23:17:57Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-10-21T19:57:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e3b0348a442afc58ca02259d476732c18ac26d0'/>
<id>urn:sha1:6e3b0348a442afc58ca02259d476732c18ac26d0</id>
<content type='text'>
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 &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-instaweb: add Python builtin http.server support</title>
<updated>2019-01-28T18:57:44Z</updated>
<author>
<name>Arti Zirk</name>
<email>arti.zirk@gmail.com</email>
</author>
<published>2019-01-28T13:24:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2eb14bb2d41b27d23120206bbe3d409a83cf042f'/>
<id>urn:sha1:2eb14bb2d41b27d23120206bbe3d409a83cf042f</id>
<content type='text'>
With this patch it is possible to launch git-instaweb by using
Python http.server CGI handler via `-d python` option.

git-instaweb generates a small wrapper around the http.server
(in GIT_DIR/gitweb/) that address a limitation of the CGI handler
where CGI scripts have to be in a cgi-bin subdirectory and
directory index can't be easily changed. To keep the implementation
small, gitweb is running on url `/cgi-bin/gitweb.cgi` and an automatic
redirection is done when opening `/`.

The generated wrapper is compatible with both Python 2 and 3.

Python is by default installed on most modern Linux distributions
which enables running `git instaweb -d python` without needing
anything else.

Signed-off-by: Arti Zirk &lt;arti.zirk@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-instaweb: fix apache2 config with apache &gt;= 2.4</title>
<updated>2018-08-08T15:30:07Z</updated>
<author>
<name>Sebastian Kisela</name>
<email>skisela@redhat.com</email>
</author>
<published>2018-08-07T07:25:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=757b12494bd3e4c6cbc2fd081d60ed41b60208ae'/>
<id>urn:sha1:757b12494bd3e4c6cbc2fd081d60ed41b60208ae</id>
<content type='text'>
The generated apache2 config fails with apache &gt;= 2.4.  The error log
states:

    AH00136: Server MUST relinquish startup privileges before accepting
    connections.  Please ensure mod_unixd or other system security
    module is loaded.
    AH00016: Configuration Failed

Fix this by loading the unixd module.  This works with older httpd as
well, so no IfVersion conditional is needed.  (Tested with httpd-2.2.15
on CentOS-6.)

Written with assistance of Todd Zullinger &lt;tmz@pobox.com&gt;

Signed-off-by: Sebastian Kisela &lt;skisela@redhat.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
