<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/perl, branch v2.35.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.35.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.35.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-10-29T17:22:40Z</updated>
<entry>
<title>tests: disable fsync everywhere</title>
<updated>2021-10-29T17:22:40Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2021-10-29T00:15:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=412e4caee387d825903bf1252aefbd5cf995a599'/>
<id>urn:sha1:412e4caee387d825903bf1252aefbd5cf995a599</id>
<content type='text'>
The "GIT_TEST_FSYNC" environment variable now exists for
disabling fsync() even on packfiles and other "critical" data.

Running "make test -j8 NO_SVN_TESTS=1" on a noisy 8-core system
on an HDD, test runtime drops from ~4 minutes down to ~3 minutes.
Using "GIT_TEST_FSYNC=1" re-enables fsync() for comparison
purposes.

SVN interopability tests are minimally affected since SVN will
still use fsync in various places.

This will also be useful for 3rd-party tools which create
throwaway git repositories of temporary data, but remains
undocumented for end users.

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/send-email-optim'</title>
<updated>2021-07-22T20:05:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-07-22T20:05:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8de2e2e41b23c466793a67966d20bad67b1263cd'/>
<id>urn:sha1:8de2e2e41b23c466793a67966d20bad67b1263cd</id>
<content type='text'>
"git send-email" optimization.

* ab/send-email-optim:
  perl: nano-optimize by replacing Cwd::cwd() with Cwd::getcwd()
  send-email: move trivial config handling to Perl
  perl: lazily load some common Git.pm setup code
  send-email: lazily load modules for a big speedup
  send-email: get rid of indirect object syntax
  send-email: use function syntax instead of barewords
  send-email: lazily shell out to "git var"
  send-email: lazily load config for a big speedup
  send-email: copy "config_regxp" into git-send-email.perl
  send-email: refactor sendemail.smtpencryption config parsing
  send-email: remove non-working support for "sendemail.smtpssl"
  send-email tests: test for boolean variables without a value
  send-email tests: support GIT_TEST_PERL_FATAL_WARNINGS=true
</content>
</entry>
<entry>
<title>Merge branch 'so/log-m-implies-p'</title>
<updated>2021-06-14T04:33:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-06-14T04:33:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8e444e66df45ee5bbe84af0d884c6625627219f3'/>
<id>urn:sha1:8e444e66df45ee5bbe84af0d884c6625627219f3</id>
<content type='text'>
The "-m" option in "git log -m" that does not specify which format,
if any, of diff is desired did not have any visible effect; it now
implies some form of diff (by default "--patch") is produced.

* so/log-m-implies-p:
  diff-merges: let "-m" imply "-p"
  diff-merges: rename "combined_imply_patch" to "merges_imply_patch"
  stash list: stop passing "-m" to "git log"
  git-svn: stop passing "-m" to "git rev-list"
  diff-merges: move specific diff-index "-m" handling to diff-index
  t4013: test "git diff-index -m"
  t4013: test "git diff-tree -m"
  t4013: test "git log -m --stat"
  t4013: test "git log -m --raw"
  t4013: test that "-m" alone has no effect in "git log"
</content>
</entry>
<entry>
<title>perl: nano-optimize by replacing Cwd::cwd() with Cwd::getcwd()</title>
<updated>2021-05-28T09:38:07Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-05-28T09:23:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=17530b2ed2eac62706b8bbbcf93f62866f651ffd'/>
<id>urn:sha1:17530b2ed2eac62706b8bbbcf93f62866f651ffd</id>
<content type='text'>
It has been pointed out[1] that cwd() invokes "pwd(1)" while getcwd()
is a Perl-native XS function. For what we're using these for we can
use getcwd().

The performance difference is miniscule, we're saving on the order of
a millisecond or so, see [2] below for the benchmark. I don't think
this matters in practice for optimizing git-send-email or perl
execution (unlike the patches leading up to this one).

But let's do it regardless of that, if only so we don't have to think
about this as a low-hanging fruit anymore.

1. https://lore.kernel.org/git/20210512180517.GA11354@dcvr/
2.
    $ perl -MBenchmark=:all -MCwd -wE 'cmpthese(10000, { getcwd =&gt; sub { getcwd }, cwd =&gt; sub { cwd }, pwd =&gt; sub { system "pwd &gt;/dev/null" }})'
                (warning: too few iterations for a reliable count)
                             Rate                  pwd                 cwd    getcwd
    pwd                     982/s                   --                -48%     -100%
    cwd                    1890/s                  92%                  --     -100%
    getcwd 10000000000000000000/s 1018000000000000000% 529000000000000064%        -

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>perl: lazily load some common Git.pm setup code</title>
<updated>2021-05-28T09:38:07Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-05-28T09:23:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5a544a4e11e2a08a813215c1b9cc80cc1555c7c2'/>
<id>urn:sha1:5a544a4e11e2a08a813215c1b9cc80cc1555c7c2</id>
<content type='text'>
Instead of unconditionally requiring modules such as File::Spec, let's
only load them when needed. This speeds up code that only needs a
subset of the features Git.pm provides.

This brings a plain invocation of "git send-email" down from 52/37
loaded modules under NO_GETTEXT=[|Y] to 39/18, and it now takes
~60-~70ms instead of ~80-~90ms. The runtime of t9001-send-email.sh
test is down to ~13s from ~15s.

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>Merge branch 'ab/send-email-inline-hooks-path'</title>
<updated>2021-05-27T03:36:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-27T03:36:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f4d715b0acaf008d0f09c42378cac90acaadea8e'/>
<id>urn:sha1:f4d715b0acaf008d0f09c42378cac90acaadea8e</id>
<content type='text'>
Code simplification.

* ab/send-email-inline-hooks-path:
  send-email: move "hooks_path" invocation to git-send-email.perl
  send-email: don't needlessly abs_path() the core.hooksPath
</content>
</entry>
<entry>
<title>send-email: move "hooks_path" invocation to git-send-email.perl</title>
<updated>2021-05-27T00:00:59Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-05-26T11:21:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7cbc0455cc07702c5eeff1062c7e2a820758714f'/>
<id>urn:sha1:7cbc0455cc07702c5eeff1062c7e2a820758714f</id>
<content type='text'>
Move the newly added "hooks_path" API in Git.pm to its only user in
git-send-email.perl. This was added in c8243933c74 (git-send-email:
Respect core.hooksPath setting, 2021-03-23), meaning that it hasn't
yet made it into a non-rc release of git.

The consensus with Git.pm is that we need to be considerate of
out-of-tree users who treat it as a public documented interface. We
should therefore be less willing to add new functionality to it, least
we be stuck supporting it after our own uses for it disappear.

In this case the git-send-email.perl hook invocation will probably be
replaced by a future "git hook run" command, and in the commit
preceding this one the "hooks_path" become nothing but a trivial
wrapper for "rev-parse --git-path hooks" anyway (with no
Cwd::abs_path() call), so let's just inline this command in
git-send-email.perl itself.

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>send-email: don't needlessly abs_path() the core.hooksPath</title>
<updated>2021-05-27T00:00:57Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-05-26T11:21:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2815326f095a1126fe9b099c311fdde8d7b7b591'/>
<id>urn:sha1:2815326f095a1126fe9b099c311fdde8d7b7b591</id>
<content type='text'>
In c8243933c74 (git-send-email: Respect core.hooksPath setting,
2021-03-23) we started supporting core.hooksPath in "send-email". It's
been reported that on Windows[1] doing this by calling abs_path()
results in different canonicalizations of the absolute path.

This wasn't an issue in c8243933c74 itself, but was revealed by my
ea7811b37e0 (git-send-email: improve --validate error output,
2021-04-06) when we started emitting the path to the hook, which was
previously only internal to git-send-email.perl.

The just-landed 53753a37d09 (t9001-send-email.sh: fix expected
absolute paths on Windows, 2021-05-24) narrowly fixed this issue, but
I believe we can do better here. We should not be relying on whatever
changes Perl's abs_path() makes to the path "rev-parse --git-path
hooks" hands to us. Let's instead trust it, and hand it to Perl's
system() in git-send-email.perl. It will handle either a relative or
absolute path.

So let's revert most of 53753a37d09 and just have "hooks_path" return
what we get from "rev-parse" directly without modification. This has
the added benefit of making the error message friendlier in the common
case, we'll no longer print an absolute path for repository-local hook
errors.

1. http://lore.kernel.org/git/bb30fe2b-cd75-4782-24a6-08bb002a0367@kdbg.org

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-svn: stop passing "-m" to "git rev-list"</title>
<updated>2021-05-21T00:24:14Z</updated>
<author>
<name>Sergey Organov</name>
<email>sorganov@gmail.com</email>
</author>
<published>2021-05-20T21:47:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=23f6d40dd3e7aad72c7706bb75f77a6c73b69b56'/>
<id>urn:sha1:23f6d40dd3e7aad72c7706bb75f77a6c73b69b56</id>
<content type='text'>
rev-list doesn't utilize -m. It happens to eat it silently, so this
bug went unnoticed.

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>perl: use mock i18n functions under NO_GETTEXT=Y</title>
<updated>2021-05-06T03:58:33Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-05-05T12:21:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=256c2dc42c812e4868532b88155f60f0a269c821'/>
<id>urn:sha1:256c2dc42c812e4868532b88155f60f0a269c821</id>
<content type='text'>
Change the logic of the i18n functions I added in 5e9637c6297 (i18n:
add infrastructure for translating Git with gettext, 2011-11-18) to
use pass-through functions when NO_GETTEXT is defined.

This speeds up the compilation time of commands that use this library
when NO_GETTEXT=Y is in effect. Loading it and POSIX.pm is around 20ms
on my machine, whereas it takes 2ms to just instantiate perl itself.

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>
</feed>
