<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/graph.c, branch v2.10.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.10.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.10.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-10-11T21:19:03Z</updated>
<entry>
<title>Merge branch 'jk/graph-padding-fix' into maint</title>
<updated>2016-10-11T21:19:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-11T21:19:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=18fd96f1d706357704c8d51f12b9412cd424ac49'/>
<id>urn:sha1:18fd96f1d706357704c8d51f12b9412cd424ac49</id>
<content type='text'>
The "graph" API used in "git log --graph" miscounted the number of
output columns consumed so far when drawing a padding line, which
has been fixed; this did not affect any existing code as nobody
tried to write anything after the padding on such a line, though.

* jk/graph-padding-fix:
  graph: fix extra spaces in graph_padding_line
</content>
</entry>
<entry>
<title>graph: fix extra spaces in graph_padding_line</title>
<updated>2016-09-29T23:43:47Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-09-29T08:37:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=16477935245a522d99d0dd7e346638c02542f1d0'/>
<id>urn:sha1:16477935245a522d99d0dd7e346638c02542f1d0</id>
<content type='text'>
The graph_padding_line() function outputs a series of "|"
columns, and then pads with spaces to graph-&gt;width by
calling graph_pad_horizontally(). However, we tell the
latter that we wrote graph-&gt;num_columns characters, which is
not true; we also needed spaces between the columns. Let's
keep a count of how many characters we've written, which is
what all the other callers of graph_pad_horizontally() do.

Without this, any output that is written at the end of a
padding line will be bumped out by at least an extra
graph-&gt;num_columns spaces. Presumably nobody ever noticed
the bug because there's no code path that actually writes to
the end of a padding line.

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/log-to-diffopt-file'</title>
<updated>2016-07-19T20:22:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-19T20:22:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=63641fb07131bede8273c3b3057792c9dcf7356b'/>
<id>urn:sha1:63641fb07131bede8273c3b3057792c9dcf7356b</id>
<content type='text'>
The commands in the "log/diff" family have had an FILE* pointer in the
data structure they pass around for a long time, but some codepaths
used to always write to the standard output.  As a preparatory step
to make "git format-patch" available to the internal callers, these
codepaths have been updated to consistently write into that FILE*
instead.

* js/log-to-diffopt-file:
  mingw: fix the shortlog --output=&lt;file&gt; test
  diff: do not color output when --color=auto and --output=&lt;file&gt; is given
  t4211: ensure that log respects --output=&lt;file&gt;
  shortlog: respect the --output=&lt;file&gt; setting
  format-patch: use stdout directly
  format-patch: avoid freopen()
  format-patch: explicitly switch off color when writing to files
  shortlog: support outputting to streams other than stdout
  graph: respect the diffopt.file setting
  line-log: respect diffopt's configured output file stream
  log-tree: respect diffopt's configured output file stream
  log: prepare log/log-tree to reuse the diffopt.close_file attribute
</content>
</entry>
<entry>
<title>graph: respect the diffopt.file setting</title>
<updated>2016-06-24T21:07:52Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-06-22T15:01:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c61008fdfb59aff00ec546be6bc6cf3bd8869165'/>
<id>urn:sha1:c61008fdfb59aff00ec546be6bc6cf3bd8869165</id>
<content type='text'>
When the caller overrides diffopt.file (which defaults to stdout),
the diff machinery already redirects its output, and the graph display
should also write to that file.

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>pretty: pass graph width to pretty formatting for use in '%&gt;|(N)'</title>
<updated>2016-06-16T18:43:36Z</updated>
<author>
<name>Josef Kufner</name>
<email>josef@kufner.cz</email>
</author>
<published>2016-06-16T13:18:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3ad87c807c2b6cbfbdfb2c78412781ecc7db593d'/>
<id>urn:sha1:3ad87c807c2b6cbfbdfb2c78412781ecc7db593d</id>
<content type='text'>
Pass graph width to pretty formatting, to make N in '%&gt;|(N)'
include columns consumed by graph rendered when --graph option
is in use.

For example, in the output of

  git log --all --graph --pretty='format: [%&gt;|(20)%h] %ar%d'

this change will make all commit hashes align at 20th column from
the edge of the terminal, not from the edge of the graph.

Signed-off-by: Josef Kufner &lt;josef@kufner.cz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>convert trivial cases to ALLOC_ARRAY</title>
<updated>2016-02-22T22:51:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-02-22T22:44:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b32fa95fd8293ebfecb2b7b6c8d460579318f9fe'/>
<id>urn:sha1:b32fa95fd8293ebfecb2b7b6c8d460579318f9fe</id>
<content type='text'>
Each of these cases can be converted to use ALLOC_ARRAY or
REALLOC_ARRAY, which has two advantages:

  1. It automatically checks the array-size multiplication
     for overflow.

  2. It always uses sizeof(*array) for the element-size,
     so that it can never go out of sync with the declared
     type of the array.

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 'rs/graph-simplify'</title>
<updated>2014-09-29T19:36:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-29T19:36:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0a2ba82c76e0c28d58595fbdc2c43120f821b239'/>
<id>urn:sha1:0a2ba82c76e0c28d58595fbdc2c43120f821b239</id>
<content type='text'>
* rs/graph-simplify:
  graph: simplify graph_padding_line()
</content>
</entry>
<entry>
<title>Merge branch 'rs/realloc-array'</title>
<updated>2014-09-26T21:39:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-26T21:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1c2ea2cdc0e8c4e5af942c51b234c5af527944f6'/>
<id>urn:sha1:1c2ea2cdc0e8c4e5af942c51b234c5af527944f6</id>
<content type='text'>
Code cleanup.

* rs/realloc-array:
  use REALLOC_ARRAY for changing the allocation size of arrays
  add macro REALLOC_ARRAY
</content>
</entry>
<entry>
<title>graph: simplify graph_padding_line()</title>
<updated>2014-09-22T19:39:57Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-09-20T18:29:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0176e7a71f2c722effde0ed22db3682400010911'/>
<id>urn:sha1:0176e7a71f2c722effde0ed22db3682400010911</id>
<content type='text'>
Deduplicate code common to both branches of if statements.

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>use REALLOC_ARRAY for changing the allocation size of arrays</title>
<updated>2014-09-18T16:13:42Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-09-16T18:56:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2756ca4347cbda05b16954cd7f445c216b935e76'/>
<id>urn:sha1:2756ca4347cbda05b16954cd7f445c216b935e76</id>
<content type='text'>
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>
</feed>
