<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/get-tar-commit-id.c, branch v2.32.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.32.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.32.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2019-04-01T02:57:39Z</updated>
<entry>
<title>builtin/get-tar-commit-id: make hash size independent</title>
<updated>2019-04-01T02:57:39Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2019-02-19T00:05:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=87003d2c94985f9b3c5ef23b9c042ae3b4ede6bb'/>
<id>urn:sha1:87003d2c94985f9b3c5ef23b9c042ae3b4ede6bb</id>
<content type='text'>
To make this code independent of the hash size, verify that the length
of the comment is equal to that of any supported hash algorithm.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>get-tar-commit-id: parse comment record</title>
<updated>2019-04-01T02:57:39Z</updated>
<author>
<name>Rene Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-02-19T00:05:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3548726cd7f5c5d2d8a1359ac21ae0354bd4c895'/>
<id>urn:sha1:3548726cd7f5c5d2d8a1359ac21ae0354bd4c895</id>
<content type='text'>
Parse pax comment records properly and get rid of magic numbers for
acceptable comment length.  This simplifies a later change to handle
longer hashes.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>distinguish error versus short read from read_in_full()</title>
<updated>2017-09-27T06:45:24Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2017-09-27T06:02:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41dcc4dcccecca49e3f75212ce9e614ffe2bdcc8'/>
<id>urn:sha1:41dcc4dcccecca49e3f75212ce9e614ffe2bdcc8</id>
<content type='text'>
Many callers of read_in_full() expect to see the exact
number of bytes requested, but their error handling lumps
together true read errors and short reads due to unexpected
EOF.

We can give more specific error messages by separating these
cases (showing errno when appropriate, and otherwise
describing the short read).

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>prefer "!=" when checking read_in_full() result</title>
<updated>2017-09-27T06:45:24Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2017-09-27T06:00:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=61d36330b422237b6be9581cdbade07782ab61a8'/>
<id>urn:sha1:61d36330b422237b6be9581cdbade07782ab61a8</id>
<content type='text'>
Comparing the result of read_in_full() using less-than is
potentially dangerous, as a negative return value may be
converted to an unsigned type and be considered a success.
This is discussed further in 561598cfcf (read_pack_header:
handle signed/unsigned comparison in read result,
2017-09-13).

Each of these instances is actually fine in practice:

 - in get-tar-commit-id, the HEADERSIZE macro expands to a
   signed integer. If it were switched to an unsigned type
   (e.g., a size_t), then it would be a bug.

 - the other two callers check for a short read only after
   handling a negative return separately. This is a fine
   practice, but we'd prefer to model "!=" as a general
   rule.

So all of these cases can be considered cleanups and not
actual bugfixes.

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>get-tar-commit-id: check write_in_full() return against 0</title>
<updated>2017-09-14T06:16:21Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2017-09-13T17:11:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=68a423ab3e5c160e1162382d2ef0831039b298d4'/>
<id>urn:sha1:68a423ab3e5c160e1162382d2ef0831039b298d4</id>
<content type='text'>
We ask to write 41 bytes and make sure that the return value
is at least 41. This is the same "dangerous" pattern that
was fixed in the prior commit (wherein a negative return
value is promoted to unsigned), though it is not dangerous
here because our "41" is a constant, not an unsigned
variable.

But we should convert it anyway to avoid modeling a
dangerous construct.

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>usage: do not insist that standard input must come from a file</title>
<updated>2015-10-16T22:27:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-10-16T18:27:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=33e8fc87407505c3a96792fc47189d57b97b34c3'/>
<id>urn:sha1:33e8fc87407505c3a96792fc47189d57b97b34c3</id>
<content type='text'>
The synopsys text and the usage string of subcommands that read list
of things from the standard input are often shown like this:

	git gostak [--distim] &lt; &lt;list-of-doshes&gt;

This is problematic in a number of ways:

 * The way to use these commands is more often to feed them the
   output from another command, not feed them from a file.

 * Manual pages outside Git, commands that operate on the data read
   from the standard input, e.g "sort", "grep", "sed", etc., are not
   described with such a "&lt; redirection-from-file" in their synopsys
   text.  Our doing so introduces inconsistency.

 * We do not insist on where the output should go, by saying

	git gostak [--distim] &lt; &lt;list-of-doshes&gt; &gt; &lt;output&gt;

 * As it is our convention to enclose placeholders inside &lt;braket&gt;,
   the redirection operator followed by a placeholder filename
   becomes very hard to read, both in the documentation and in the
   help text.

Let's clean them all up, after making sure that the documentation
clearly describes the modes that take information from the standard
input and what kind of things are expected on the input.

[jc: stole example for fmt-merge-msg from Jonathan]

Helped-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use skip_prefix() to avoid more magic numbers</title>
<updated>2014-10-07T18:09:16Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-10-04T18:54:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e3f1da982e4f14e7146964cb25a5011a3f41e84a'/>
<id>urn:sha1:e3f1da982e4f14e7146964cb25a5011a3f41e84a</id>
<content type='text'>
Continue where ae021d87 (use skip_prefix to avoid magic numbers) left off
and use skip_prefix() in more places for determining the lengths of prefix
strings to avoid using dependent constants and other indirect methods.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>stop installing git-tar-tree link</title>
<updated>2013-12-03T20:35:22Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2013-12-02T23:37:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bb5d531efa804bbf09064e4a7ce65e096599f3c7'/>
<id>urn:sha1:bb5d531efa804bbf09064e4a7ce65e096599f3c7</id>
<content type='text'>
When the built-in "git tar-tree" command (a thin wrapper around "git
archive") was removed in 925ceccf (tar-tree: remove deprecated
command, 2013-11-10), the build continued to install a non-functioning
git-tar-tree command in gitexecdir by mistake:

	$ PATH=$(git --exec-path):$PATH
	$ git-tar-tree -h
	fatal: cannot handle tar-tree internally

The list of links in gitexecdir is populated from BUILTIN_OBJS, which
includes builtin/tar-tree.o to implement "git get-tar-commit-id".
Rename the get-tar-commit-id source file to builtin/get-tar-commit-id.c
to reflect its purpose and fix 'make install'.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
