<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/compat, branch v2.7.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.7.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.7.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-12-22T22:45:16Z</updated>
<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>
<entry>
<title>Merge branch 'ad/sha1-update-chunked'</title>
<updated>2015-12-04T19:19:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-12-04T19:19:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4672123fe5cb629d2a261245fd0a2e003ef35ea3'/>
<id>urn:sha1:4672123fe5cb629d2a261245fd0a2e003ef35ea3</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>
<entry>
<title>Merge branch 'js/misc-fixes' into maint</title>
<updated>2015-11-05T20:18:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-11-05T20:18:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ace5348dcb427bbce015a42a21a46dc02ae1b37b'/>
<id>urn:sha1:ace5348dcb427bbce015a42a21a46dc02ae1b37b</id>
<content type='text'>
Various compilation fixes and squelching of warnings.

* js/misc-fixes:
  Correct fscanf formatting string for I64u values
  Silence GCC's "cast of pointer to integer of a different size" warning
  Squelch warning about an integer overflow
</content>
</entry>
<entry>
<title>sha1: allow limiting the size of the data passed to SHA1_Update()</title>
<updated>2015-11-05T18:35:11Z</updated>
<author>
<name>Atousa Pahlevan Duprat</name>
<email>apahlevan@ieee.org</email>
</author>
<published>2015-11-05T06:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=001fd7a90b5851f62e700510729a5e09706f9b63'/>
<id>urn:sha1:001fd7a90b5851f62e700510729a5e09706f9b63</id>
<content type='text'>
Using the previous commit's inredirection mechanism for SHA1,
support a chunked implementation of SHA1_Update() that limits the
amount of data in the chunk passed to SHA1_Update().

This is enabled by using the Makefile variable SHA1_MAX_BLOCK_SIZE
to specify chunk size.  When using Apple's CommonCrypto library this
is set to 1GiB (the implementation cannot handle more 4GiB).

Signed-off-by: Atousa Pahlevan Duprat &lt;apahlevan@ieee.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/misc-fixes'</title>
<updated>2015-10-30T20:07:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-10-30T20:06:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=808d11926351018f73db69d54e5920adef578f62'/>
<id>urn:sha1:808d11926351018f73db69d54e5920adef578f62</id>
<content type='text'>
Various compilation fixes and squelching of warnings.

* js/misc-fixes:
  Correct fscanf formatting string for I64u values
  Silence GCC's "cast of pointer to integer of a different size" warning
  Squelch warning about an integer overflow
</content>
</entry>
<entry>
<title>Silence GCC's "cast of pointer to integer of a different size" warning</title>
<updated>2015-10-26T20:24:03Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2015-10-26T13:15:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=56a1a3ab449df33268776a8b72a301d3ee67ad8d'/>
<id>urn:sha1:56a1a3ab449df33268776a8b72a301d3ee67ad8d</id>
<content type='text'>
When calculating hashes from pointers, it actually makes sense to cut
off the most significant bits. In that case, said warning does not make
a whole lot of sense.

So let's just work around it by casting the pointer first to intptr_t
and then casting up/down to the final integral type.

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/mingw.c: remove printf format warning</title>
<updated>2015-10-23T17:17:53Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2015-10-23T06:02:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d62c89afb278ab625dd399222ceb8d48b0358756'/>
<id>urn:sha1:d62c89afb278ab625dd399222ceb8d48b0358756</id>
<content type='text'>
5096d490 (convert trivial sprintf / strcpy calls to xsnprintf) converted
two sprintf calls. Now GCC warns that "format '%u' expects argument of
type 'unsigned int', but argument 4 has type 'long unsigned int'".
Instead of changing the format string, use a variable of type unsigned
in place of the typedef-ed type DWORD, which hides that it is actually an
unsigned long.

There is no correctness issue with the old code because unsigned long and
unsigned are always of the same size on Windows, even in 64-bit builds.

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>prefer memcpy to strcpy</title>
<updated>2015-10-05T18:08:05Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-09-24T21:08:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=34fa79a6cde56d6d428ab0d3160cb094ebad3305'/>
<id>urn:sha1:34fa79a6cde56d6d428ab0d3160cb094ebad3305</id>
<content type='text'>
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).

This also eliminates calls to strcpy, which make auditing
the code base harder.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
