<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/usage.c, branch v1.7.0.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v1.7.0.5</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v1.7.0.5'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2009-11-23T00:14:48Z</updated>
<entry>
<title>Fix truncated usage messages</title>
<updated>2009-11-23T00:14:48Z</updated>
<author>
<name>Björn Gustavsson</name>
<email>bgustavsson@gmail.com</email>
</author>
<published>2009-11-22T21:19:53Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=625a860cb73b259683a4285705ac17e92298d5d5'/>
<id>urn:sha1:625a860cb73b259683a4285705ac17e92298d5d5</id>
<content type='text'>
The usage messages for some commands (such as 'git diff-tree')
are truncated because they don't fit in a fixed buffer of
1024 bytes.

It would be tempting to eliminate the buffer and the problem once
and for all by doing the output in three steps, but doing so could
(according to commit d048a96e) increase the likelyhood of messing
up the display.

So we just increase the size of the buffer.

Signed-off-by: Björn Gustavsson &lt;bgustavsson@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Introduce usagef() that takes a printf-style format</title>
<updated>2009-11-10T20:00:21Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2009-11-09T15:05:02Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=64b1cb74f8312c0a43ce32f51097172efc69355a'/>
<id>urn:sha1:64b1cb74f8312c0a43ce32f51097172efc69355a</id>
<content type='text'>
Some new callers would want to use printf-like formatting, when issuing
their usage messages.  An option is to change usage() itself also be like
printf(), which would make it similar to die() and warn().

But usage() is typically fixed, as opposed to die() and warn() that gives
diagnostics depending on the situation.  Indeed, the majority of strings
given by existing callsites to usage() are fixed strings.  If we were to
make usage() take printf-style format, they all need to be changed to have
"%s" as their first argument.

So instead, introduce usagef() so that limited number of callers can use
it.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add NORETURN_PTR for function pointers</title>
<updated>2009-10-01T08:12:21Z</updated>
<author>
<name>Erik Faye-Lund</name>
<email>kusmabite@googlemail.com</email>
</author>
<published>2009-09-30T18:05:50Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=18660bc96ec0419cc096a53998d3197f2b905e8a'/>
<id>urn:sha1:18660bc96ec0419cc096a53998d3197f2b905e8a</id>
<content type='text'>
Some compilers (including at least MSVC and ARM RVDS) supports
NORETURN on function declarations, but not on function pointers.

This patch makes it possible to define NORETURN for these compilers,
by splitting the NORETURN macro into two - one for function
declarations and one for function pointers.

Signed-off-by: Erik Faye-Lund &lt;kusmabite@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>increase portability of NORETURN declarations</title>
<updated>2009-10-01T08:12:21Z</updated>
<author>
<name>Erik Faye-Lund</name>
<email>kusmabite@googlemail.com</email>
</author>
<published>2009-09-30T18:05:49Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a4f3131c07c1f601be1e24b2143ca7e2deea09b5'/>
<id>urn:sha1:a4f3131c07c1f601be1e24b2143ca7e2deea09b5</id>
<content type='text'>
Some compilers (including at least MSVC) support NORETURN
on function declarations, but only before the function-name.

This patch makes it possible to define NORETURN to something
meaningful for those compilers.

Signed-off-by: Erik Faye-Lund &lt;kusmabite@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>die_errno(): double % in strerror() output just in case</title>
<updated>2009-06-27T18:14:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-06-27T15:58:45Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f8b5a8e13cb4d60c8b630f92a8f07590ef218ec5'/>
<id>urn:sha1:f8b5a8e13cb4d60c8b630f92a8f07590ef218ec5</id>
<content type='text'>
[tr: handle border case where % is placed at end of buffer]

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Thomas Rast &lt;trast@student.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Introduce die_errno() that appends strerror(errno) to die()</title>
<updated>2009-06-27T18:14:53Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2009-06-27T15:58:44Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=b875036e5a2ab569a2123abe9ebfe25258227951'/>
<id>urn:sha1:b875036e5a2ab569a2123abe9ebfe25258227951</id>
<content type='text'>
There are many calls to die() that do, or should, report
strerror(errno) to indicate how the syscall they guard failed.
Introduce a small helper function for this case.

Note:

- POSIX says vsnprintf can modify errno in some unlikely cases, so we
  have to use errno early.

- We take some care to pass the original format to die_routine(), in
  case someone wants to call die_errno() with custom format
  characters.

Signed-off-by: Thomas Rast &lt;trast@student.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Increase the size of the die/warning buffer to avoid truncation</title>
<updated>2009-03-24T23:58:20Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2009-03-24T23:10:35Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=389d17677187f5e996022b7b8e0faf800608cb3a'/>
<id>urn:sha1:389d17677187f5e996022b7b8e0faf800608cb3a</id>
<content type='text'>
Long messages like those from lockfile.c when a lock can't be
obtained truncate with only 256 bytes in the message buffer.
Bump it to 1024 to give more space for these longer cases.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>usage.c: remove unused functions</title>
<updated>2008-09-29T14:30:16Z</updated>
<author>
<name>Nanako Shiraishi</name>
<email>nanako3@lavabit.com</email>
</author>
<published>2008-09-25T09:41:04Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=07ad5a157d5f73941abfc3a511725d32e4c023d4'/>
<id>urn:sha1:07ad5a157d5f73941abfc3a511725d32e4c023d4</id>
<content type='text'>
This removes three functions that are not used anywhere.

Signed-off-by: Nanako Shiraishi &lt;nanako3@lavabit.com&gt;
Acked-by: Lars Hjemli &lt;hjemli@gmail.com&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>print warning/error/fatal messages in one shot</title>
<updated>2007-11-10T06:25:36Z</updated>
<author>
<name>Nicolas Pitre</name>
<email>nico@cam.org</email>
</author>
<published>2007-11-09T19:33:54Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=d048a96ee9bec968be0bdc9c43ffce61169545be'/>
<id>urn:sha1:d048a96ee9bec968be0bdc9c43ffce61169545be</id>
<content type='text'>
Not doing so is likely to create a messed up display when sent over the
sideband protocol.

Signed-off-by: Nicolas Pitre &lt;nico@cam.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Rename warn() to warning() to fix symbol conflicts on BSD and Mac OS</title>
<updated>2007-03-31T08:11:11Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2007-03-30T23:07:05Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=46efd2d93ce39fd5c1a91f0a2f918f2d8bbfdf92'/>
<id>urn:sha1:46efd2d93ce39fd5c1a91f0a2f918f2d8bbfdf92</id>
<content type='text'>
This fixes a problem reported by Randal Schwartz:

&gt;I finally tracked down all the (albeit inconsequential) errors I was getting
&gt;on both OpenBSD and OSX.  It's the warn() function in usage.c.  There's
&gt;warn(3) in BSD-style distros.  It'd take a "great rename" to change it, but if
&gt;someone with better C skills than I have could do that, my linker and I would
&gt;appreciate it.

It was annoying to me, too, when I was doing some mergetool testing on
Mac OS X, so here's a fix.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: "Randal L. Schwartz" &lt;merlyn@stonehenge.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
</feed>
