<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t4013-diff-various.sh, 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>2014-07-28T18:31:46Z</updated>
<entry>
<title>Merge branch 'maint'</title>
<updated>2014-07-28T18:31:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-28T18:31:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=583b61c1af1bac12d6b48b2583ad508b5ab9964c'/>
<id>urn:sha1:583b61c1af1bac12d6b48b2583ad508b5ab9964c</id>
<content type='text'>
* maint:
  t4013: test diff-tree's --stdin commit formatting
  diff-tree: avoid lookup_unknown_object
  object_as_type: set commit index
  alloc: factor out commit index
  add object_as_type helper for casting objects
  parse_object_buffer: do not set object type
  move setting of object-&gt;type to alloc_* functions
  alloc: write out allocator definitions
  alloc.c: remove the alloc_raw_commit_node() function
</content>
</entry>
<entry>
<title>t4013: test diff-tree's --stdin commit formatting</title>
<updated>2014-07-28T18:31:32Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-07-28T18:01:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d299e9e550c1bf8640907fdba1f03cc585ee71df'/>
<id>urn:sha1:d299e9e550c1bf8640907fdba1f03cc585ee71df</id>
<content type='text'>
Once upon a time, git-log was just "rev-list | diff-tree",
and we did not bother to test it separately. These days git-log
is implemented internally, but we want to make sure that the
rev-list to diff-tree pipeline continues to function. Let's
add a basic sanity test.

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>t4013-diff-various.sh: use the $( ... ) construct for command substitution</title>
<updated>2014-04-30T18:08:06Z</updated>
<author>
<name>Elia Pinto</name>
<email>gitter.spiros@gmail.com</email>
</author>
<published>2014-04-30T16:22:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4ff03347ec945542e288a6a020bdd8153c915592'/>
<id>urn:sha1:4ff03347ec945542e288a6a020bdd8153c915592</id>
<content type='text'>
The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
   sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
done

and then carefully proof-read.

Signed-off-by: Elia Pinto &lt;gitter.spiros@gmail.com&gt;
Reviewed-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diffstat summary line varies by locale: miscellany</title>
<updated>2012-03-13T21:26:33Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2012-03-13T05:05:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6dd88832e77ad7c0c7f82522d3741b5b7bf62fbd'/>
<id>urn:sha1:6dd88832e77ad7c0c7f82522d3741b5b7bf62fbd</id>
<content type='text'>
These changes are in the same spirit as the six patches that
precede them, but they haven't been split into individually
justifiable patches yet.

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