<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/graph.c, branch v2.11.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.11.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.11.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-10-06T21:53:11Z</updated>
<entry>
<title>Merge branch 'jk/graph-padding-fix'</title>
<updated>2016-10-06T21:53:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-06T21:53:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cb52426d9af9129c052529c5207fc014c38bd46f'/>
<id>urn:sha1:cb52426d9af9129c052529c5207fc014c38bd46f</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>graph: add support for --line-prefix on all graph-aware output</title>
<updated>2016-09-01T01:07:09Z</updated>
<author>
<name>Jacob Keller</name>
<email>jacob.keller@gmail.com</email>
</author>
<published>2016-08-31T23:27:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=660e113ce11840f4bc4028bff89889e6122fe89a'/>
<id>urn:sha1:660e113ce11840f4bc4028bff89889e6122fe89a</id>
<content type='text'>
Add an extension to git-diff and git-log (and any other graph-aware
displayable output) such that "--line-prefix=&lt;string&gt;" will print the
additional line-prefix on every line of output.

To make this work, we have to fix a few bugs in the graph API that force
graph_show_commit_msg to be used only when you have a valid graph.
Additionally, we extend the default_diff_output_prefix handler to work
even when no graph is enabled.

This is somewhat of a hack on top of the graph API, but I think it
should be acceptable here.

This will be used by a future extension of submodule display which
displays the submodule diff as the actual diff between the pre and post
commit in the submodule project.

Add some tests for both git-log and git-diff to ensure that the prefix
is honored correctly.

Signed-off-by: Jacob Keller &lt;jacob.keller@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff.c: remove output_prefix_length field</title>
<updated>2016-09-01T01:07:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-31T23:27:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cd48dadb8d840637f0f55b1ad0d8f50d892c767d'/>
<id>urn:sha1:cd48dadb8d840637f0f55b1ad0d8f50d892c767d</id>
<content type='text'>
"diff/log --stat" has a logic that determines the display columns
available for the diffstat part of the output and apportions it for
pathnames and diffstat graph automatically.

5e71a84a (Add output_prefix_length to diff_options, 2012-04-16)
added the output_prefix_length field to diff_options structure to
allow this logic to subtract the display columns used for the
history graph part from the total "terminal width"; this matters
when the "git log --graph -p" option is in use.

The field must be set to the number of display columns needed to
show the output from the output_prefix() callback, which is error
prone.  As there is only one user of the field, and the user has the
actual value of the prefix string, let's get rid of the field and
have the user count the display width itself.

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>
</feed>
