<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/compat, branch v2.7.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.7.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-02-05T22:54:17Z</updated>
<entry>
<title>Merge branch 'js/dirname-basename' into maint</title>
<updated>2016-02-05T22:54:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-02-05T22:54:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=07be1da216debe1f76cd4d03ac5effcb9e40e6c6'/>
<id>urn:sha1:07be1da216debe1f76cd4d03ac5effcb9e40e6c6</id>
<content type='text'>
dirname() emulation has been added, as Msys2 lacks it.

* js/dirname-basename:
  mingw: avoid linking to the C library's isalpha()
  t0060: loosen overly strict expectations
  t0060: verify that basename() and dirname() work as expected
  compat/basename.c: provide a dirname() compatibility function
  compat/basename: make basename() conform to POSIX
  Refactor skipping DOS drive prefixes
</content>
</entry>
<entry>
<title>Merge branch 'jk/clang-pedantic' into maint</title>
<updated>2016-02-05T22:54:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-02-05T22:54:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e29ac23027ed9993c32e1f68d79068498a25165'/>
<id>urn:sha1:6e29ac23027ed9993c32e1f68d79068498a25165</id>
<content type='text'>
A few unportable C construct have been spotted by clang compiler
and have been fixed.

* jk/clang-pedantic:
  bswap: add NO_UNALIGNED_LOADS define
  avoid shifting signed integers 31 bits
</content>
</entry>
<entry>
<title>mingw: avoid linking to the C library's isalpha()</title>
<updated>2016-01-25T22:04:14Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2016-01-25T21:47:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e7d5ce816579723150c341116737fb51d8e33eb3'/>
<id>urn:sha1:e7d5ce816579723150c341116737fb51d8e33eb3</id>
<content type='text'>
The implementation of mingw_skip_dos_drive_prefix() calls isalpha() via
has_dos_drive_prefix(). Since the definition occurs long before isalpha()
is defined in git-compat-util.h, my build environment reports:

    CC alloc.o
In file included from git-compat-util.h:186,
                 from cache.h:4,
                 from alloc.c:12:
compat/mingw.h: In function 'mingw_skip_dos_drive_prefix':
compat/mingw.h:365: warning: implicit declaration of function 'isalpha'

Dscho does not see a similar warning in his build and suspects that
ctype.h is included somehow behind the scenes. This implies that his build
links to the C library's isalpha() and does not use git's isalpha().

To fix both the warning in my build and the inconsistency in Dscho's
build, move the function definition to mingw.c. Then it picks up git's
isalpha() because git-compat-util.h is included at the top of the file.

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>compat/basename.c: provide a dirname() compatibility function</title>
<updated>2016-01-12T18:40:54Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-01-12T07:57:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=824682ab51e3510817f7a7303decc9f9df38ee9a'/>
<id>urn:sha1:824682ab51e3510817f7a7303decc9f9df38ee9a</id>
<content type='text'>
When there is no `libgen.h` to our disposal, we miss the `dirname()`
function.  Earlier we added basename() compatibility function for
the same reason at e1c06886 (compat: add a basename() compatibility
function, 2009-05-31).

So far, we only had one user of that function: credential-cache--daemon
(which was only compiled when Unix sockets are available, anyway). But
now we also have `builtin/am.c` as user, so we need it.

Since `dirname()` is a sibling of `basename()`, we simply put our very
own `gitdirname()` implementation next to `gitbasename()` and use it
if `NO_LIBGEN_H` has been set.

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>compat/basename: make basename() conform to POSIX</title>
<updated>2016-01-12T18:40:27Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-01-12T07:57:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=61725be349b44f15b0239182c859553d5c547ba0'/>
<id>urn:sha1:61725be349b44f15b0239182c859553d5c547ba0</id>
<content type='text'>
According to POSIX, basename("/path/") should return "path", not
"path/". Likewise, basename(NULL) and basename("") should both
return "." to conform.

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>Refactor skipping DOS drive prefixes</title>
<updated>2016-01-12T18:39:40Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-01-12T07:57:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2f36eed936f70105e80681aafac645ff34acc667'/>
<id>urn:sha1:2f36eed936f70105e80681aafac645ff34acc667</id>
<content type='text'>
Junio noticed that there is an implicit assumption in pretty much
all the code calling has_dos_drive_prefix(): it forces all of its
callsites to hardcode the knowledge that the DOS drive prefix is
always two bytes long.

While this assumption is pretty safe, we can still make the code
more readable and less error-prone by introducing a function that
skips the DOS drive prefix safely.

While at it, we change the has_dos_drive_prefix() return value: it
now returns the number of bytes to be skipped if there is a DOS
drive prefix.

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>bswap: add NO_UNALIGNED_LOADS define</title>
<updated>2016-01-04T17:51:33Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-12-29T06:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a0df2e5a7efe90e932af66e70ba6c863a5826833'/>
<id>urn:sha1:a0df2e5a7efe90e932af66e70ba6c863a5826833</id>
<content type='text'>
The byte-swapping code automatically decides, based on the
platform, whether it is sensible to cast and do a potentially
unaligned ntohl(), or to pick individual bytes out of an
array.

It can be handy to override this decision, though, when
turning on compiler flags that will complain about unaligned
loads (such as -fsanitize=undefined). This patch adds a
macro check to make this possible.

There's no nice Makefile knob here; this is for prodding at
Git's internals, and anybody using it can set
"-DNO_UNALIGNED_LOADS" in the same place they are setting up
"-fsanitize".

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/emu-write-epipe-on-windows'</title>
<updated>2015-12-22T22:45:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-12-22T22:45:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=de60b97422c87abf6ef4ba62bdc81f2671af405b'/>
<id>urn:sha1:de60b97422c87abf6ef4ba62bdc81f2671af405b</id>
<content type='text'>
The write(2) emulation for Windows learned to set errno to EPIPE
when necessary.

* js/emu-write-epipe-on-windows:
  mingw: emulate write(2) that fails with a EPIPE
</content>
</entry>
<entry>
<title>mingw: emulate write(2) that fails with a EPIPE</title>
<updated>2015-12-21T16:59:04Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2015-12-17T17:08:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2b86292ed1756a66439f79ceda88dfc86a10dfa9'/>
<id>urn:sha1:2b86292ed1756a66439f79ceda88dfc86a10dfa9</id>
<content type='text'>
On Windows, when writing to a pipe fails, errno is always
EINVAL. However, Git expects it to be EPIPE.

According to the documentation, there are two cases in which write()
triggers EINVAL: the buffer is NULL, or the length is odd but the mode
is 16-bit Unicode (the broken pipe is not mentioned as possible cause).
Git never sets the file mode to anything but binary, therefore we know
that errno should actually be EPIPE if it is EINVAL and the buffer is
not NULL.

See https://msdn.microsoft.com/en-us/library/1570wh78.aspx for more
details.

This works around t5571.11 failing with v2.6.4 on Windows.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ad/sha1-update-chunked' into maint</title>
<updated>2015-12-08T22:05:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-12-08T22:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b5d2d8eef0ad08022a3f635c0bc292eb2cc5aefc'/>
<id>urn:sha1:b5d2d8eef0ad08022a3f635c0bc292eb2cc5aefc</id>
<content type='text'>
Apple's common crypto implementation of SHA1_Update() does not take
more than 4GB at a time, and we now have a compile-time workaround
for it.

* ad/sha1-update-chunked:
  sha1: allow limiting the size of the data passed to SHA1_Update()
  sha1: provide another level of indirection for the SHA-1 functions
</content>
</entry>
</feed>
