<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-sh-setup.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>2024-12-06T22:52:08Z</updated>
<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-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-submodule.sh: remove unused sanitize_submodule_env()</title>
<updated>2022-06-28T20:13:16Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-06-28T10:05:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=85775255f18e0a6a6b2e65394bc18ec440dba99d'/>
<id>urn:sha1:85775255f18e0a6a6b2e65394bc18ec440dba99d</id>
<content type='text'>
The sanitize_submodule_env() function was last used before
b3c5f5cb048 (submodule: move core cmd_update() logic to C,
2022-03-15), let's remove it.

This also allows us to remove clear_local_git_env() from
git-sh-setup.sh. That function hasn't been documented in
Documentation/git-sh-setup.sh, and since 14111fc4927 (git: submodule
honor -c credential.* from command line, 2016-02-29) it had only been
used in the sanitize_submodule_env() function being removed here.

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 remnant bits referring to `git-legacy-stash`</title>
<updated>2022-01-28T02:00:09Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-01-27T22:03:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6de07229ac1dd269e12f941f701432b61dc43ad3'/>
<id>urn:sha1:6de07229ac1dd269e12f941f701432b61dc43ad3</id>
<content type='text'>
In 8a2cd3f5123 (stash: remove the stash.useBuiltin setting, 2020-03-03),
we removed `git-legacy-stash.sh`. But `git-sh-setup.sh` somehow still
thinks about it. Let's just not.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/sh-retire-helper-functions'</title>
<updated>2021-11-29T23:41:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-11-29T23:41:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad1260b6c994f7c0f9c259bd39f39979f7f4ecc2'/>
<id>urn:sha1:ad1260b6c994f7c0f9c259bd39f39979f7f4ecc2</id>
<content type='text'>
Make a few helper functions unused and then lose them.

* ab/sh-retire-helper-functions:
  git-sh-setup: remove "sane_grep", it's not needed anymore
  git-sh-setup: remove unused sane_egrep() function
  git-instaweb: unconditionally assume that gitweb is mod_perl capable
  Makefile: remove $(NO_CURL) from $(SCRIPT_DEFINES)
  Makefile: remove $(GIT_VERSION) from $(SCRIPT_DEFINES)
  Makefile: move git-SCRIPT-DEFINES adjacent to $(SCRIPT_DEFINES)
</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-sh-setup: remove unused sane_egrep() function</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:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d7927d428cdb6ed0d709fea2e5353d56833ae02e'/>
<id>urn:sha1:d7927d428cdb6ed0d709fea2e5353d56833ae02e</id>
<content type='text'>
The is_zero_oid() function in git-submodule.sh has not been used since
e83e3333b57 (submodule: port submodule subcommand 'summary' from shell
to C, 2020-08-13), so we can remove it, and the sane_egrep() function,
dead is_zero_oid() was the only function which still referenced it.

Unlike some other functions in git-sh-setup.sh, this function has not
been documented in git-sh-setup(1), so per [1] it should be OK to
remove it. I'm still unclear about the future of some of the other
functions[2], but any questions in that area should not apply here.

1. https://lore.kernel.org/git/xmqqr1dtgnn8.fsf@gitster.g/
1. https://lore.kernel.org/git/87tuiwjfvi.fsf@evledraar.gmail.com/

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 messaging supporting --preserve-merges</title>
<updated>2021-10-21T23:04:29Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-10-21T18:37:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c1e10b2dce28b434127870ed09293cf9adc9fcc2'/>
<id>urn:sha1:c1e10b2dce28b434127870ed09293cf9adc9fcc2</id>
<content type='text'>
Remove messages that were last used by the code removed in
a74b35081c5 (rebase: drop support for `--preserve-merges`,
2021-09-07).

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 unused "pull with rebase" message</title>
<updated>2021-09-12T23:22:05Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-09-11T11:17:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=be8d370e3c0791e8b181ddc73cce37ff8356257c'/>
<id>urn:sha1:be8d370e3c0791e8b181ddc73cce37ff8356257c</id>
<content type='text'>
Remove the "pull with rebase" message previously used by the
git-pull.sh script, which was removed in 49eb8d39c78 (Remove
contrib/examples/*, 2018-03-25).

Even if some out-of-tree user copy/pasted the old git-pull.sh code,
and relied on passing it a "pull with rebase" argument, we'll fall
back on the "*" case here, they just won't get the "pull with rebase"
part of their message translated.

I don't think it's likely that anyone out-of-tree relied on that, but
I'm being conservative here per the discussion that can be found
upthread of [1].

1. https://lore.kernel.org/git/87tuiwjfvi.fsf@evledraar.gmail.com/

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>stash: optionally use the scripted version again</title>
<updated>2019-03-07T00:41:40Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2019-02-25T23:16:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=90a462725ef3932a2408e78a47e3dfc1b8d445cf'/>
<id>urn:sha1:90a462725ef3932a2408e78a47e3dfc1b8d445cf</id>
<content type='text'>
We recently converted the `git stash` command from Unix shell scripts
to builtins.

Let's end users a way out when they discover a bug in the
builtin command: `stash.useBuiltin`.

As the file name `git-stash` is already in use, let's rename the
scripted backend to `git-legacy-stash`.

To make the test suite pass with `stash.useBuiltin=false`, this commit
also backports rudimentary support for `-q` (but only *just* enough
to appease the test suite), and adds a super-ugly hack to force exit
code 129 for `git stash -h`.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
