<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/log-tree.c, branch v2.1.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.1.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.1.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-07-30T19:30:08Z</updated>
<entry>
<title>pretty: make empty userformats truly empty</title>
<updated>2014-07-30T19:30:08Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-07-29T17:56:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b9c7d6e4330e3dcdb3b3e5f013e5667e47555c95'/>
<id>urn:sha1:b9c7d6e4330e3dcdb3b3e5f013e5667e47555c95</id>
<content type='text'>
If the user provides an empty format with "--format=", we
end up putting in extra whitespace that the user cannot
prevent. This comes from two places:

  1. If the format is missing a terminating newline, we add
     one automatically. This makes sense for --format=%h, but
     not for a truly empty format.

  2. We add an extra newline between the pretty-printed
     format and a diff or diffstat. If the format is empty,
     there's no point in doing so if there's nothing to
     separate.

With this patch, one can get a diff with no other cruft out
of "diff-tree --format= $commit".

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 'cc/for-each-mergetag'</title>
<updated>2014-07-21T18:17:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-21T18:17:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dadb89d92ce9c81846c1b4c743a41b6e845b572c'/>
<id>urn:sha1:dadb89d92ce9c81846c1b4c743a41b6e845b572c</id>
<content type='text'>
* cc/for-each-mergetag:
  commit: add for_each_mergetag()
</content>
</entry>
<entry>
<title>Merge branch 'zk/log-graph-showsig'</title>
<updated>2014-07-16T18:32:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-16T18:32:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5e40e41f1c51581d8cd8f3816de49934fec784fc'/>
<id>urn:sha1:5e40e41f1c51581d8cd8f3816de49934fec784fc</id>
<content type='text'>
The "--show-signature" option did not pay much attention to
"--graph".

* zk/log-graph-showsig:
  log: fix indentation for --graph --show-signature
</content>
</entry>
<entry>
<title>Merge branch 'mg/fix-log-mergetag-color'</title>
<updated>2014-07-16T18:32:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-16T18:32:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=efbef3f6e3a8c32f4f8bc78667733228ed76a713'/>
<id>urn:sha1:efbef3f6e3a8c32f4f8bc78667733228ed76a713</id>
<content type='text'>
* mg/fix-log-mergetag-color:
  log: correctly identify mergetag signature verification status
</content>
</entry>
<entry>
<title>log: correctly identify mergetag signature verification status</title>
<updated>2014-07-10T22:25:03Z</updated>
<author>
<name>Michael J Gruber</name>
<email>git@drmicha.warpmail.net</email>
</author>
<published>2014-06-27T13:18:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=42c55ce49eb3c8741f62a0abdfb38182d461126c'/>
<id>urn:sha1:42c55ce49eb3c8741f62a0abdfb38182d461126c</id>
<content type='text'>
A wrong '}' made our code record the results of mergetag signature
verification incorrectly.

Fix it.

Signed-off-by: Michael J Gruber &lt;git@drmicha.warpmail.net&gt;
Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>log: fix indentation for --graph --show-signature</title>
<updated>2014-07-09T16:37:43Z</updated>
<author>
<name>Zoltan Klinger</name>
<email>zoltan.klinger@gmail.com</email>
</author>
<published>2014-07-09T02:10:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cf3983d1ff861657c8813feb7df82a74a29d06bc'/>
<id>urn:sha1:cf3983d1ff861657c8813feb7df82a74a29d06bc</id>
<content type='text'>
The git log --graph --show-signature command incorrectly indents the gpg
information about signed commits and merged signed tags. It does not
follow the level of indentation of the current commit.

Example of garbled output:
$ git log --show-signature --graph
*   commit 258e0a237cb69aaa587b0a4fb528bb0316b1b776
|\  gpg: Signature made Mon, Jun 30, 2014 13:22:33 EDT using RSA key ID DA08
gpg: Good signature from "Jason Pyeron &lt;jpye...@pdinc.us&gt;"
Merge: 727c355 1ca13ed
| | Author: Jason Pyeron &lt;jpye...@pdinc.us&gt;
| | Date:   Mon Jun 30 13:22:29 2014 -0400
| |
| |     Merge of 1ca13ed2271d60ba9 branch - rebranding
| |
| * commit 1ca13ed2271d60ba93d40bcc8db17ced8545f172
| | gpg: Signature made Mon, Jun 23, 2014  9:45:47 EDT using RSA key ID DD37
gpg: Good signature from "Stephen Robert Guglielmo &lt;s...@guglielmo.us&gt;"
gpg:                 aka "Stephen Robert Guglielmo &lt;srguglie...@gmail.com&gt;"
Author: Stephen R Guglielmo &lt;s...@guglielmo.us&gt;
| | Date:   Mon Jun 23 09:45:27 2014 -0400
| |
| |     Minor URL updates

In log-tree.c modify show_sig_lines() function to call graph_show_oneline()
after each line of gpg information it has printed in order to preserve
the level of indentation for the next output line.

Reported-by: Jason Pyeron &lt;jpyeron@pdinc.us&gt;
Signed-off-by: Zoltan Klinger &lt;zoltan.klinger@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit: add for_each_mergetag()</title>
<updated>2014-07-07T22:32:21Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2014-07-07T06:35:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=063da62b02aeafe58fdacce0ea48c0761b06df60'/>
<id>urn:sha1:063da62b02aeafe58fdacce0ea48c0761b06df60</id>
<content type='text'>
In the same way as there is for_each_ref() to iterate on refs,
for_each_mergetag() allows the caller to iterate on the mergetags of
a given commit.  Use it to rewrite show_mergetag() used in "git log".

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reuse cached commit buffer when parsing signatures</title>
<updated>2014-06-13T19:10:13Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-13T06:32:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=218aa3a6162b80696a82b8745daa38fa826985ae'/>
<id>urn:sha1:218aa3a6162b80696a82b8745daa38fa826985ae</id>
<content type='text'>
When we call show_signature or show_mergetag, we read the
commit object fresh via read_sha1_file and reparse its
headers. However, in most cases we already have the object
data available, attached to the "struct commit". This is
partially laziness in dealing with the memory allocation
issues, but partially defensive programming, in that we
would always want to verify a clean version of the buffer
(not one that might have been munged by other users of the
commit).

However, we do not currently ever munge the commit buffer,
and not using the already-available buffer carries a fairly
big performance penalty when we are looking at a large
number of commits. Here are timings on linux.git:

  [baseline, no signatures]
  $ time git log &gt;/dev/null
  real    0m4.902s
  user    0m4.784s
  sys     0m0.120s

  [before]
  $ time git log --show-signature &gt;/dev/null
  real    0m14.735s
  user    0m9.964s
  sys     0m0.944s

  [after]
  $ time git log --show-signature &gt;/dev/null
  real    0m9.981s
  user    0m5.260s
  sys     0m0.936s

Note that our user CPU time drops almost in half, close to
the non-signature case, but we do still spend more
wall-clock and system time, presumably from dealing with
gpg.

An alternative to this is to note that most commits do not
have signatures (less than 1% in this repo), yet we pay the
re-parsing cost for every commit just to find out if it has
a mergetag or signature. If we checked that when parsing the
commit initially, we could avoid re-examining most commits
later on. Even if we did pursue that direction, however,
this would still speed up the cases where we _do_ have
signatures. So it's probably worth doing either way.

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>commit: record buffer length in cache</title>
<updated>2014-06-13T19:09:38Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-10T21:44:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8597ea3afea067b39ba7d4adae7ec6c1ee0e7c91'/>
<id>urn:sha1:8597ea3afea067b39ba7d4adae7ec6c1ee0e7c91</id>
<content type='text'>
Most callsites which use the commit buffer try to use the
cached version attached to the commit, rather than
re-reading from disk. Unfortunately, that interface provides
only a pointer to the NUL-terminated buffer, with no
indication of the original length.

For the most part, this doesn't matter. People do not put
NULs in their commit messages, and the log code is happy to
treat it all as a NUL-terminated string. However, some code
paths do care. For example, when checking signatures, we
want to be very careful that we verify all the bytes to
avoid malicious trickery.

This patch just adds an optional "size" out-pointer to
get_commit_buffer and friends. The existing callers all pass
NULL (there did not seem to be any obvious sites where we
could avoid an immediate strlen() call, though perhaps with
some further refactoring we could).

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>use get_cached_commit_buffer where appropriate</title>
<updated>2014-06-13T19:08:17Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-10T21:40:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a97934d8205772ffd2a528a9e970af7dec725012'/>
<id>urn:sha1:a97934d8205772ffd2a528a9e970af7dec725012</id>
<content type='text'>
Some call sites check commit-&gt;buffer to see whether we have
a cached buffer, and if so, do some work with it. In the
long run we may want to switch these code paths to make
their decision on a different boolean flag (because checking
the cache may get a little more expensive in the future).
But for now, we can easily support them by converting the
calls to use get_cached_commit_buffer.

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