<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/compat, branch v2.29.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.29.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.29.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-10-07T16:55:20Z</updated>
<entry>
<title>compat/mingw.h: drop extern from function declaration</title>
<updated>2020-10-07T16:55:20Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2020-10-07T08:31:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fcedb379fd1842cf943a05a331be862ad8d2d919'/>
<id>urn:sha1:fcedb379fd1842cf943a05a331be862ad8d2d919</id>
<content type='text'>
In 554544276a (*.[ch]: remove extern from function declarations using
spatch, 2019-04-29), `extern` on function declarations were declared to
be redundant and thus removed from the codebase. An `extern` was
accidentally reintroduced in 08809c09aa (mingw: add a helper function to
attach GDB to the current process, 2020-02-13).

Remove this spurious `extern`.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/drop-unaligned-loads'</title>
<updated>2020-10-04T19:49:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-10-04T19:49:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=86cca370e1989e0cbcd412f8770883a20d86eee8'/>
<id>urn:sha1:86cca370e1989e0cbcd412f8770883a20d86eee8</id>
<content type='text'>
Compilation fix around type punning.

* jk/drop-unaligned-loads:
  Revert "fast-export: use local array to store anonymized oid"
  bswap.h: drop unaligned loads
</content>
</entry>
<entry>
<title>bswap.h: drop unaligned loads</title>
<updated>2020-09-24T19:30:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-09-24T19:21:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c578e29ba0791041ad7fabf1166dd6f7e7f26d1f'/>
<id>urn:sha1:c578e29ba0791041ad7fabf1166dd6f7e7f26d1f</id>
<content type='text'>
Our put_be32() routine and its variants (get_be32(), put_be64(), etc)
has two implementations: on some platforms we cast memory in place and
use nothl()/htonl(), which can cause unaligned memory access. And on
others, we pick out the individual bytes using bitshifts.

This introduces extra complexity, and sometimes causes compilers to
generate warnings about type-punning. And it's not clear there's any
performance advantage.

This split goes back to 660231aa97 (block-sha1: support for
architectures with memory alignment restrictions, 2009-08-12). The
unaligned versions were part of the original block-sha1 code in
d7c208a92e (Add new optimized C 'block-sha1' routines, 2009-08-05),
which says it is:

   Based on the mozilla SHA1 routine, but doing the input data accesses a
   word at a time and with 'htonl()' instead of loading bytes and shifting.

Back then, Linus provided timings versus the mozilla code which showed a
27% improvement:

  https://lore.kernel.org/git/alpine.LFD.2.01.0908051545000.3390@localhost.localdomain/

However, the unaligned loads were either not the useful part of that
speedup, or perhaps compilers and processors have changed since then.
Here are times for computing the sha1 of 4GB of random data, with and
without -DNO_UNALIGNED_LOADS (and BLK_SHA1=1, of course). This is with
gcc 10, -O2, and the processor is a Core i9-9880H.

  [stock]
  Benchmark #1: t/helper/test-tool sha1 &lt;foo.rand
    Time (mean ± σ):      6.638 s ±  0.081 s    [User: 6.269 s, System: 0.368 s]
    Range (min … max):    6.550 s …  6.841 s    10 runs

  [-DNO_UNALIGNED_LOADS]
  Benchmark #1: t/helper/test-tool sha1 &lt;foo.rand
    Time (mean ± σ):      6.418 s ±  0.015 s    [User: 6.058 s, System: 0.360 s]
    Range (min … max):    6.394 s …  6.447 s    10 runs

And here's the same test run on an AMD A8-7600, using gcc 8.

  [stock]
  Benchmark #1: t/helper/test-tool sha1 &lt;foo.rand
    Time (mean ± σ):     11.721 s ±  0.113 s    [User: 10.761 s, System: 0.951 s]
    Range (min … max):   11.509 s … 11.861 s    10 runs

  [-DNO_UNALIGNED_LOADS]
  Benchmark #1: t/helper/test-tool sha1 &lt;foo.rand
    Time (mean ± σ):     11.744 s ±  0.066 s    [User: 10.807 s, System: 0.928 s]
    Range (min … max):   11.637 s … 11.863 s    10 runs

So the unaligned loads don't seem to help much, and actually make things
worse. It's possible there are platforms where they provide more
benefit, but:

  - the non-x86 platforms for which we use this code are old and obscure
    (powerpc and s390).

  - the main caller that cares about performance is block-sha1. But
    these days it is rarely used anyway, in favor of sha1dc (which is
    already much slower, and nobody seems to have cared that much).

Let's just drop unaligned versions entirely in the name of simplicity.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>vcbuild: fix batch file name in README</title>
<updated>2020-09-03T17:19:48Z</updated>
<author>
<name>Orgad Shaneh</name>
<email>orgads@gmail.com</email>
</author>
<published>2020-09-02T20:18:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3384a1ef78cae095d527d106cc15ca13b075c05f'/>
<id>urn:sha1:3384a1ef78cae095d527d106cc15ca13b075c05f</id>
<content type='text'>
Signed-off-by: Orgad Shaneh &lt;orgads@gmail.com&gt;
Acked-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>vcbuild: fix library name for expat with make MSVC=1</title>
<updated>2020-09-03T17:19:42Z</updated>
<author>
<name>Orgad Shaneh</name>
<email>orgads@gmail.com</email>
</author>
<published>2020-09-02T20:16:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c2f3ef8d8f16bccd08f17d33f6a6e10f0e79cdb3'/>
<id>urn:sha1:c2f3ef8d8f16bccd08f17d33f6a6e10f0e79cdb3</id>
<content type='text'>
Signed-off-by: Orgad Shaneh &lt;orgads@gmail.com&gt;
Acked-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 'jh/mingw-unlink'</title>
<updated>2020-08-19T23:14:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-08-19T23:14:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5a0482662f076ca7e1f27ef2848feec1763583d1'/>
<id>urn:sha1:5a0482662f076ca7e1f27ef2848feec1763583d1</id>
<content type='text'>
"unlink" emulation on MinGW has been optimized.

* jh/mingw-unlink:
  mingw: improve performance of mingw_unlink()
</content>
</entry>
<entry>
<title>mingw: improve performance of mingw_unlink()</title>
<updated>2020-08-17T18:27:16Z</updated>
<author>
<name>Jeff Hostetler</name>
<email>jeffhost@microsoft.com</email>
</author>
<published>2020-08-17T10:37:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=680e0b4524482c4bb679030188f6ae8db4caff06'/>
<id>urn:sha1:680e0b4524482c4bb679030188f6ae8db4caff06</id>
<content type='text'>
Update mingw_unlink() to first try to delete the file with existing
permissions before trying to force it.

Windows throws an error when trying to delete a read-only file.  The
mingw_unlink() compatibility wrapper always tries to _wchmod(666) the
file before calling _wunlink() to avoid that error.  However, since
most files in the worktree are already writable, this is usually
wasted effort.

Update mingw_unlink() to just call DeleteFileW() directly and if that
succeeds return.  If that fails, fall back into the existing code path
to update the permissions and use _wunlink() to get the existing
error code mapping.

Signed-off-by: Jeff Hostetler &lt;jeffhost@microsoft.com&gt;
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>strvec: convert more callers away from argv_array name</title>
<updated>2020-07-28T22:02:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-07-28T20:24:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ef8d7ac42a6a62d678166fe25ea743315809d2bb'/>
<id>urn:sha1:ef8d7ac42a6a62d678166fe25ea743315809d2bb</id>
<content type='text'>
We eventually want to drop the argv_array name and just use strvec
consistently. There's no particular reason we have to do it all at once,
or care about interactions between converted and unconverted bits.
Because of our preprocessor compat layer, the names are interchangeable
to the compiler (so even a definition and declaration using different
names is OK).

This patch converts remaining files from the first half of the alphabet,
to keep the diff to a manageable size.

The conversion was done purely mechanically with:

  git ls-files '*.c' '*.h' |
  xargs perl -i -pe '
    s/ARGV_ARRAY/STRVEC/g;
    s/argv_array/strvec/g;
  '

and then selectively staging files with "git add '[abcdefghjkl]*'".
We'll deal with any indentation/style fallouts separately.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/msvc-build-fix'</title>
<updated>2020-06-18T04:54:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-06-18T04:54:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9906d5f8e9323724f74715740161e4a91f5d7f87'/>
<id>urn:sha1:9906d5f8e9323724f74715740161e4a91f5d7f87</id>
<content type='text'>
Workaround breakage in MSVC build, where "curl-config --cflags"
gives settings appropriate for GCC build.

* js/msvc-build-fix:
  msvc: fix "REG_STARTEND" issue
</content>
</entry>
<entry>
<title>msvc: fix "REG_STARTEND" issue</title>
<updated>2020-06-04T22:52:21Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-06-04T21:09:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bb0e43d8a1ae8489071573c5323c28ed2935a354'/>
<id>urn:sha1:bb0e43d8a1ae8489071573c5323c28ed2935a354</id>
<content type='text'>
In 897d68e7af82 (Makefile: use curl-config --cflags, 2020-03-26), we
taught the build process to use `curl-config --cflags` to make sure that
it can find cURL's headers.

In the MSVC build, this is completely bogus because we're running in a
Git for Windows SDK whose `curl-config` supports the _GCC_ build.

Let's just ignore each and every `-I&lt;path&gt;` option where `&lt;path&gt;` points
to GCC/Clang specific headers.

Reported by Jeff Hostetler in
https://github.com/microsoft/git/issues/275.

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