<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pretty.c, branch v2.9.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.9.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.9.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-07-11T17:44:09Z</updated>
<entry>
<title>Merge branch 'nd/graph-width-padded' into maint</title>
<updated>2016-07-11T17:44:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-11T17:44:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5f30bb4a8144a2132568021a18972a89c1dfd3ca'/>
<id>urn:sha1:5f30bb4a8144a2132568021a18972a89c1dfd3ca</id>
<content type='text'>
"log --graph --format=" learned that "%&gt;|(N)" specifies the width
relative to the terminal's left edge, not relative to the area to
draw text that is to the right of the ancestry-graph section.  It
also now accepts negative N that means the column limit is relative
to the right border.

* nd/graph-width-padded:
  pretty.c: support &lt;direction&gt;|(&lt;negative number&gt;) forms
  pretty: pass graph width to pretty formatting for use in '%&gt;|(N)'
</content>
</entry>
<entry>
<title>Merge branch 'et/pretty-format-c-auto' into maint</title>
<updated>2016-06-27T16:56:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-06-27T16:56:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fbb4138cb2e6b77d1d8386f336e7813fcfd3cb02'/>
<id>urn:sha1:fbb4138cb2e6b77d1d8386f336e7813fcfd3cb02</id>
<content type='text'>
The commands in `git log` family take %C(auto) in a custom format
string.  This unconditionally turned the color on, ignoring
--no-color or with --color=auto when the output is not connected to
a tty; this was corrected to make the format truly behave as
"auto".

* et/pretty-format-c-auto:
  format_commit_message: honor `color=auto` for `%C(auto)`
</content>
</entry>
<entry>
<title>pretty.c: support &lt;direction&gt;|(&lt;negative number&gt;) forms</title>
<updated>2016-06-16T18:43:37Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2016-06-16T13:18:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=066790d7cb0fa22e64f1276d8a0e33d18484f62a'/>
<id>urn:sha1:066790d7cb0fa22e64f1276d8a0e33d18484f62a</id>
<content type='text'>
%&gt;|(num), %&gt;&lt;|(num) and %&lt;|(num), where num is a positive number, sets a
fixed column from the screen's left border. There is no way for us to
specifiy a column relative to the right border, which is useful when you
want to make use of all terminal space (on big screens). Use negative
num for that. Inspired by Go's array syntax (*).

(*) I know Python has this first (or before Go, at least) but the idea
didn't occur to me until I learned Go.

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>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>format_commit_message: honor `color=auto` for `%C(auto)`</title>
<updated>2016-05-27T18:24:54Z</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2016-05-27T03:46:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b15a3e005af07843116c73205742adfbab3d2e82'/>
<id>urn:sha1:b15a3e005af07843116c73205742adfbab3d2e82</id>
<content type='text'>
git-log(1) documents that when specifying the `%C(auto)` format
placeholder will "turn on auto coloring on the next %placeholders
until the color is switched again."

However, when `%C(auto)` is used, the present implementation will turn
colors on unconditionally (even if the color configuration is turned off
for the current context - for example, `--no-color` was specified or the
color is `auto` and the output is not a tty).

Update `format_commit_one` to examine the current context when a format
string of `%C(auto)` is specified, which ensures that we will not
unconditionally write colors.  This brings that behavior in line with
the behavior of `%C(auto,&lt;colorname&gt;)`, and allows the user the ability
to specify that color should be displayed only when the output is a
tty.

Additionally, add a test for `%C(auto)` and update the existing tests
for `%C(auto,...)` as they were misidentified as being applicable to
`%C(auto)`.

Tests from Jeff King.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Edward Thomson &lt;ethomson@edwardthomson.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pretty: allow tweaking tabwidth in --expand-tabs</title>
<updated>2016-03-30T19:52:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-03-29T23:05:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fe37a9c586a65943e1bca327a1bbe1ca4a3d3023'/>
<id>urn:sha1:fe37a9c586a65943e1bca327a1bbe1ca4a3d3023</id>
<content type='text'>
When the local convention of the project is to use tab width that is
not 8, it may make sense to allow "git log --expand-tabs=&lt;n&gt;" to
tweak the output to match it.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pretty: enable --expand-tabs by default for selected pretty formats</title>
<updated>2016-03-30T19:39:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-03-29T22:49:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0893eec85fca0f76039a96cbbcd3592ff8571c24'/>
<id>urn:sha1:0893eec85fca0f76039a96cbbcd3592ff8571c24</id>
<content type='text'>
"git log --pretty={medium,full,fuller}" and "git log" by default
prepend 4 spaces to the log message, so it makes sense to enable
the new "expand-tabs" facility by default for these formats.
Add --no-expand-tabs option to override the new default.

The change alone breaks a test in t4201 that runs "git shortlog"
on the output from "git log", and expects that the output from
"git log" does not do such a tab expansion.  Adjust the test to
explicitly disable expand-tabs with --no-expand-tabs.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pretty: expand tabs in indented logs to make things line up properly</title>
<updated>2016-03-30T18:25:35Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-03-16T16:15:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7cc13c717b52d3539e76f087d747f96d0d24a914'/>
<id>urn:sha1:7cc13c717b52d3539e76f087d747f96d0d24a914</id>
<content type='text'>
A commit log message sometimes tries to line things up using tabs,
assuming fixed-width font with the standard 8-place tab settings.
Viewing such a commit however does not work well in "git log", as
we indent the lines by prefixing 4 spaces in front of them.

This should all line up:

  Column 1	Column 2
  --------	--------
  A		B
  ABCD		EFGH
  SPACES        Instead of Tabs

Even with multi-byte UTF8 characters:

  Column 1	Column 2
  --------	--------
  Ä		B
  åäö		100
  A Møøse	once bit my sister..

Tab-expand the lines in "git log --expand-tabs" output before
prefixing 4 spaces.

This is based on the patch by Linus Torvalds, but at this step, we
require an explicit command line option to enable the behaviour.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Remove get_object_hash.</title>
<updated>2015-11-20T13:02:05Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-11-10T02:22:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ed1c9977cb1b63e4270ad8bdf967a2d02580aa08'/>
<id>urn:sha1:ed1c9977cb1b63e4270ad8bdf967a2d02580aa08</id>
<content type='text'>
Convert all instances of get_object_hash to use an appropriate reference
to the hash member of the oid member of struct object.  This provides no
functional change, as it is essentially a macro substitution.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Convert struct object to object_id</title>
<updated>2015-11-20T13:02:05Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-11-10T02:22:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f2fd0760f62e79609fef7bfd7ecebb002e8e4ced'/>
<id>urn:sha1:f2fd0760f62e79609fef7bfd7ecebb002e8e4ced</id>
<content type='text'>
struct object is one of the major data structures dealing with object
IDs.  Convert it to use struct object_id instead of an unsigned char
array.  Convert get_object_hash to refer to the new member as well.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
</feed>
