<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/diff.h, branch v1.7.6.3</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.6.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.6.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2011-06-06T18:40:14Z</updated>
<entry>
<title>Merge branch 'jk/diff-not-so-quick'</title>
<updated>2011-06-06T18:40:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-06-06T18:40:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=456a4c08b8d8ddefda939014c15877ace3e3f499'/>
<id>urn:sha1:456a4c08b8d8ddefda939014c15877ace3e3f499</id>
<content type='text'>
* jk/diff-not-so-quick:
  diff: futureproof "stop feeding the backend early" logic
  diff_tree: disable QUICK optimization with diff filter

Conflicts:
	diff.c
</content>
</entry>
<entry>
<title>diff: futureproof "stop feeding the backend early" logic</title>
<updated>2011-05-31T16:21:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-05-31T16:14:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=28b9264dd6cbadcef8b3e48c24ffcb2893b668b3'/>
<id>urn:sha1:28b9264dd6cbadcef8b3e48c24ffcb2893b668b3</id>
<content type='text'>
Refactor the "do not stop feeding the backend early" logic into a small
helper function and use it in both run_diff_files() and diff_tree() that
has the stop-early optimization. We may later add other types of diffcore
transformation that require to look at the whole result like diff-filter
does, and having the logic in a single place is essential for longer term
maintainability.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jh/dirstat-lines'</title>
<updated>2011-05-13T18:01:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-05-13T18:01:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=df54e2bfd6afd0e7dcf5c658c92f469fdd1b06ff'/>
<id>urn:sha1:df54e2bfd6afd0e7dcf5c658c92f469fdd1b06ff</id>
<content type='text'>
* jh/dirstat-lines:
  Mark dirstat error messages for translation
  Improve error handling when parsing dirstat parameters
  New --dirstat=lines mode, doing dirstat analysis based on diffstat
  Allow specifying --dirstat cut-off percentage as a floating point number
  Add config variable for specifying default --dirstat behavior
  Refactor --dirstat parsing; deprecate --cumulative and --dirstat-by-file
  Make --dirstat=0 output directories that contribute &lt; 0.1% of changes
  Add several testcases for --dirstat and friends
</content>
</entry>
<entry>
<title>Merge branch 'jc/fix-diff-files-unmerged'</title>
<updated>2011-05-06T17:52:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-05-06T17:52:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=22dbeee715e4c9fae3e3fdc1f3a2c4a6ec90e593'/>
<id>urn:sha1:22dbeee715e4c9fae3e3fdc1f3a2c4a6ec90e593</id>
<content type='text'>
* jc/fix-diff-files-unmerged:
  diff-files: show unmerged entries correctly
  diff: remove often unused parameters from diff_unmerge()
  diff.c: return filepair from diff_unmerge()
  test: use $_z40 from test-lib
</content>
</entry>
<entry>
<title>New --dirstat=lines mode, doing dirstat analysis based on diffstat</title>
<updated>2011-04-29T18:22:55Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2011-04-29T09:36:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=1c57a627bf269f3c83c48ad724cd8b14292502ef'/>
<id>urn:sha1:1c57a627bf269f3c83c48ad724cd8b14292502ef</id>
<content type='text'>
This patch adds an alternative implementation of show_dirstat(), called
show_dirstat_by_line(), which uses the more expensive diffstat analysis
(as opposed to show_dirstat()'s own (relatively inexpensive) analysis)
to derive the numbers from which the --dirstat output is computed.

The alternative implementation is controlled by the new "lines" parameter
to the --dirstat option (or the diff.dirstat config variable).

For binary files, the diffstat analysis counts bytes instead of lines,
so to prevent binary files from dominating the dirstat results, the
byte counts for binary files are divided by 64 before being compared to
their textual/line-based counterparts. This is a stupid and ugly - but
very cheap - heuristic.

In linux-2.6.git, running the three different --dirstat modes:

  time git diff v2.6.20..v2.6.30 --dirstat=changes &gt; /dev/null
vs.
  time git diff v2.6.20..v2.6.30 --dirstat=lines &gt; /dev/null
vs.
  time git diff v2.6.20..v2.6.30 --dirstat=files &gt; /dev/null

yields the following average runtimes on my machine:

 - "changes" (default): ~6.0 s
 - "lines":             ~9.6 s
 - "files":             ~0.1 s

So, as expected, there's a considerable performance hit (~60%) by going
through the full diffstat analysis as compared to the default "changes"
analysis (obviously, "files" is much faster than both). As such, the
"lines" mode is probably only useful if you really need the --dirstat
numbers to be consistent with the numbers returned from the other
--*stat options.

The patch also includes documentation and tests for the new dirstat mode.

Improved-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Allow specifying --dirstat cut-off percentage as a floating point number</title>
<updated>2011-04-29T18:20:11Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2011-04-29T09:36:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=712d2c7dd893212756c21787fc12d6f71327e167'/>
<id>urn:sha1:712d2c7dd893212756c21787fc12d6f71327e167</id>
<content type='text'>
Only the first digit after the decimal point is kept, as the dirstat
calculations all happen in permille.

Selftests verifying floating-point percentage input has been added.

Improved-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Improved-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/diff-irreversible-delete'</title>
<updated>2011-04-28T21:11:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-04-28T21:11:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=50d3062ab2cea4e999b8f3bafd211ff348bca600'/>
<id>urn:sha1:50d3062ab2cea4e999b8f3bafd211ff348bca600</id>
<content type='text'>
* jc/diff-irreversible-delete:
  git diff -D: omit the preimage of deletes
</content>
</entry>
<entry>
<title>diff: remove often unused parameters from diff_unmerge()</title>
<updated>2011-04-24T05:34:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-04-22T23:05:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=fa7b290895ba2c4407ae818911ba620eaca53bbd'/>
<id>urn:sha1:fa7b290895ba2c4407ae818911ba620eaca53bbd</id>
<content type='text'>
e9c8409 (diff-index --cached --raw: show tree entry on the LHS for
unmerged entries., 2007-01-05) added a &lt;mode, object name&gt; pair as
parameters to this function, to store them in the pre-image side of an
unmerged file pair.  Now the function is fixed to return the filepair it
queued, we can make the caller on the special case codepath to do so.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff.c: return filepair from diff_unmerge()</title>
<updated>2011-04-24T05:34:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-04-22T22:55:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=76399c0195278ed2b52716b821cf064f77131736'/>
<id>urn:sha1:76399c0195278ed2b52716b821cf064f77131736</id>
<content type='text'>
The underlying diff_queue() returns diff_filepair so that the caller can
further add information to it, and the helper function diff_unmerge()
utilizes the feature itself, but does not expose it to its callers, which
was kind of selfish.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git diff -D: omit the preimage of deletes</title>
<updated>2011-04-03T06:52:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-03-01T00:11:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=467ddc14fe37ea6a3d77058fb24c4240e82e6344'/>
<id>urn:sha1:467ddc14fe37ea6a3d77058fb24c4240e82e6344</id>
<content type='text'>
When reviewing a patch while concentrating primarily on the text after
then change, wading through pages of deleted text involves a cognitive
burden.

Introduce the -D option that omits the preimage text from the patch output
for deleted files.  When used with -B (represent total rewrite as a single
wholesale deletion followed by a single wholesale addition), the preimage
text is also omitted.

To prevent such a patch from being applied by mistake, the output is
designed not to be usable by "git apply" (or GNU "patch"); it is strictly
for human consumption.

It of course is possible to "apply" such a patch by hand, as a human can
read the intention out of such a patch.  It however is impossible to apply
such a patch even manually in reverse, as the whole point of this option
is to omit the information necessary to do so from the output.

Initial request by Mart Sõmermaa, documentation and tests helped by
Michael J Gruber.

Signed-off-by: Michael J Gruber &lt;git@drmicha.warpmail.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
