<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t4013, branch v2.2.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.2.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.2.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2012-04-30T21:17:26Z</updated>
<entry>
<title>diff --stat: use less columns for change counts</title>
<updated>2012-04-30T21:17:26Z</updated>
<author>
<name>Zbigniew Jędrzejewski-Szmek</name>
<email>zbyszek@in.waw.pl</email>
</author>
<published>2012-04-30T20:38:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dc801e71a72201f760618c6a706a31edccdc6fd2'/>
<id>urn:sha1:dc801e71a72201f760618c6a706a31edccdc6fd2</id>
<content type='text'>
Number of columns required for change counts is now computed based on
the maximum number of changed lines instead of being fixed. This means
that usually a few more columns will be available for the filenames
and the graph.

The graph width logic is also modified to include enough space for
"Bin XXX -&gt; YYY bytes".

If changes to binary files are mixed with changes to text files,
change counts are padded to take at least three columns. And the other
way around, if change counts require more than three columns, then
"Bin"s are padded to align with the change count. This way, the +-
part starts in the same column as "XXX -&gt; YYY" part for binary files.
This makes the graph easier to parse visually thanks to the empty
column. This mimics the layout of diff --stat before this change.

Tests and the tutorial are updated to reflect the new --stat output.
This means either the removal of extra padding and/or the addition of
up to three extra characters to truncated filenames. One test is added
to check the graph alignment when a binary file change and text file
change of more than 999 lines are committed together.

Signed-off-by: Zbigniew Jędrzejewski-Szmek &lt;zbyszek@in.waw.pl&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Use correct grammar in diffstat summary line</title>
<updated>2012-02-04T07:19:42Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-02-01T12:55:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7f814632f5d4d7af9f4225ece6039dbc44e03079'/>
<id>urn:sha1:7f814632f5d4d7af9f4225ece6039dbc44e03079</id>
<content type='text'>
"git diff --stat" and "git apply --stat" now learn to print the line
"%d files changed, %d insertions(+), %d deletions(-)" in singular form
whenever applicable. "0 insertions" and "0 deletions" are also omitted
unless they are both zero.

This matches how versions of "diffstat" that are not prehistoric produced
their output, and also makes this line translatable.

[jc: with help from Thomas Dickey in archaeology of "diffstat"]
[jc: squashed Jonathan's updates to illustrations in tutorials and a test]

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
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>Teach --dirstat not to completely ignore rearranged lines within a file</title>
<updated>2011-04-11T18:16:15Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2011-04-10T22:48:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2ff3a80334115797b8446909655e536f43900bc5'/>
<id>urn:sha1:2ff3a80334115797b8446909655e536f43900bc5</id>
<content type='text'>
Currently, the --dirstat analysis ignores when lines within a file are
rearranged, because the "damage" calculated by show_dirstat() is 0.
However, if the object name has changed, we already know that there is
some damage, and it is unintuitive to claim there is _no_ damage.

Teach show_dirstat() to assign a minimum amount of damage (== 1) to
entries for which the analysis otherwise yields zero damage, to still
represent that these files are changed, instead of saying that there
is no change.

Also, skip --dirstat analysis when the object names are the same (e.g. for
a pure file rename).

Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>--dirstat-by-file: Make it faster and more correct</title>
<updated>2011-04-11T17:12:24Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2011-04-10T22:48:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0133dab75d8b15c559aa9df66134d72dce0e0476'/>
<id>urn:sha1:0133dab75d8b15c559aa9df66134d72dce0e0476</id>
<content type='text'>
Currently, when using --dirstat-by-file, it first does the full --dirstat
analysis (using diffcore_count_changes()), and then resets 'damage' to 1,
if any damage was found by diffcore_count_changes().

But --dirstat-by-file is not interested in the file damage per se. It only
cares if the file changed at all. In that sense it only cares if the blob
object for a file has changed. We therefore only need to compare the
object names of each file pair in the diff queue and we can skip the
entire --dirstat analysis and simply set 'damage' to 1 for each entry
where the object name has changed.

This makes --dirstat-by-file faster, and also bypasses --dirstat's practice
of ignoring rearranged lines within a file.

The patch also contains an added testcase verifying that --dirstat-by-file
now detects changes that only rearrange lines within a file.

Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>--dirstat: Describe non-obvious differences relative to --stat or regular diff</title>
<updated>2011-04-11T17:11:17Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2011-04-10T22:48:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=204f01a2f734fddab95b09123b04b1305620e7b6'/>
<id>urn:sha1:204f01a2f734fddab95b09123b04b1305620e7b6</id>
<content type='text'>
Also add a testcase documenting the current behavior.

Improved-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>log: fix --max-count when used together with -S or -G</title>
<updated>2011-03-09T22:28:24Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2011-03-09T20:52:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=251df09be3af658404f5f5f670a013d5806645d4'/>
<id>urn:sha1:251df09be3af658404f5f5f670a013d5806645d4</id>
<content type='text'>
The --max-count limit is implemented by counting revisions in
get_revision(), but the -S and -G take effect later when running diff.
Hence "--max-count=10 -Sfoo" meant "examine the 10 first revisions, and
out of them, show only those changing the occurences of foo", not "show 10
revisions changing the occurences of foo".

In case the commit isn't actually shown, cancel the decrement of
max_count.

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: support --cached on unborn branches</title>
<updated>2011-02-07T23:04:30Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2011-02-03T06:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a2b7a3b3a966c5801efe968d4b5656fa5a885409'/>
<id>urn:sha1:a2b7a3b3a966c5801efe968d4b5656fa5a885409</id>
<content type='text'>
"git diff --cached" (without revision) used to mean "git diff --cached
HEAD" (i.e. the user was too lazy to type HEAD). This "correctly"
failed when there was no commit yet. But was that correctness useful?

This patch changes the definition of what particular command means.
It is a request to show what _would_ be committed without further "git
add". The internal implementation is the same "git diff --cached HEAD"
when HEAD exists, but when there is no commit yet, it compares the index
with an empty tree object to achieve the desired result.

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>diff/log -G&lt;pattern&gt;: tests</title>
<updated>2010-08-31T21:30:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-08-31T21:27:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bf1dfc31032bf6195be63dd92d0b67906e4ff4f8'/>
<id>urn:sha1:bf1dfc31032bf6195be63dd92d0b67906e4ff4f8</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: parse separate options like -S foo</title>
<updated>2010-08-06T16:14:22Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2010-08-05T08:22:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dea007fb4c8170ea007b577698c7b44df6c318b9'/>
<id>urn:sha1:dea007fb4c8170ea007b577698c7b44df6c318b9</id>
<content type='text'>
Change the option parsing logic in revision.c to accept separate forms
like `-S foo' in addition to `-Sfoo'. The rest of git already accepted
this form, but revision.c still used its own option parsing.

Short options affected are -S&lt;string&gt;, -l&lt;num&gt; and -O&lt;orderfile&gt;, for
which an empty string wouldn't make sense, hence -&lt;option&gt; &lt;arg&gt; isn't
ambiguous.

This patch does not handle --stat-name-width and --stat-width, which are
special-cases where diff_long_opt do not apply. They are handled in a
separate patch to ease review.

Original patch by Matthieu Moy, plus refactoring by Jonathan Nieder.

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>format-patch: Add a signature option (--signature)</title>
<updated>2010-06-16T17:08:59Z</updated>
<author>
<name>Stephen Boyd</name>
<email>bebarino@gmail.com</email>
</author>
<published>2010-06-16T05:59:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6622d9c7103525bb8673f93df4104ab2a46cb174'/>
<id>urn:sha1:6622d9c7103525bb8673f93df4104ab2a46cb174</id>
<content type='text'>
By default, git uses the version string as the signature for all
patches output by format-patch. Many employers (mine included)
require the use of a signature on all outgoing mails. In a
format-patch | send-email workflow there isn't an easy way to modify
the signature without breaking the pipe and manually replacing the
version string with the signature required. Instead of doing all that
work, add an option (--signature) and a config variable
(format.signature) to replace the default git version signature when
formatting patches.

This does modify the original behavior of format-patch a bit. First
off the version string is now placed in the cover letter by default.
Secondly, once the configuration variable format.signature is added
to the .config file there is no way to revert back to the default
git version signature. Instead, specifying the --no-signature option
will remove the signature from the patches entirely.

Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
