<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/diff.h, branch v1.7.7.4</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.7.4</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.7.4'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2011-08-29T04:19:16Z</updated>
<entry>
<title>Merge branch 'jk/color-and-pager'</title>
<updated>2011-08-29T04:19:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-08-29T04:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f946b465d7fa13a235dd5653d37c7babb1ceb233'/>
<id>urn:sha1:f946b465d7fa13a235dd5653d37c7babb1ceb233</id>
<content type='text'>
* jk/color-and-pager:
  want_color: automatically fallback to color.ui
  diff: don't load color config in plumbing
  config: refactor get_colorbool function
  color: delay auto-color decision until point of use
  git_config_colorbool: refactor stdout_is_tty handling
  diff: refactor COLOR_DIFF from a flag into an int
  setup_pager: set GIT_PAGER_IN_USE
  t7006: use test_config helpers
  test-lib: add helper functions for config
  t7006: modernize calls to unset

Conflicts:
	builtin/commit.c
	parse-options.c
</content>
</entry>
<entry>
<title>diff: refactor COLOR_DIFF from a flag into an int</title>
<updated>2011-08-18T21:35:53Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2011-08-18T05:03:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f1c9626105d5e4962a5ccaa4620114d03f32ad02'/>
<id>urn:sha1:f1c9626105d5e4962a5ccaa4620114d03f32ad02</id>
<content type='text'>
This lets us store more than just a bit flag for whether we
want color; we can also store whether we want automatic
colors. This can be useful for making the automatic-color
decision closer to the point of use.

This mostly just involves replacing DIFF_OPT_* calls with
manipulations of the flag. The biggest exception is that
calls to DIFF_OPT_TST must check for "o-&gt;use_color &gt; 0",
which lets an "unknown" value (i.e., the default) stay at
"no color". In the previous code, a value of "-1" was not
propagated at all.

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 'mg/diff-stat-count'</title>
<updated>2011-06-30T00:03:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-06-30T00:03:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=a852aac48d881d538e24d5493e218a93b12b1709'/>
<id>urn:sha1:a852aac48d881d538e24d5493e218a93b12b1709</id>
<content type='text'>
* mg/diff-stat-count:
  diff --stat-count: finishing touches
  diff-options.txt: describe --stat-{width,name-width,count}
  diff: introduce --stat-lines to limit the stat lines
  diff.c: omit hidden entries from namelen calculation with --stat
</content>
</entry>
<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>diff: introduce --stat-lines to limit the stat lines</title>
<updated>2011-05-27T17:44:34Z</updated>
<author>
<name>Michael J Gruber</name>
<email>git@drmicha.warpmail.net</email>
</author>
<published>2011-05-27T12:36:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=808e1db231195af31075d1e0f9e4f6026a96d06a'/>
<id>urn:sha1:808e1db231195af31075d1e0f9e4f6026a96d06a</id>
<content type='text'>
Often one is interested in the full --stat output only for commits which
change a few files, but not others, because larger restructuring gives a
--stat which fills a few screens.

Introduce a new option --stat-count=&lt;count&gt; which limits the --stat output
to the first &lt;count&gt; lines, followed by a "..." line. It can
also be given as the third parameter in
--stat=&lt;width&gt;,&lt;name-width&gt;,&lt;count&gt;.

Also, the unstuck form is supported analogous to the other two stat
parameters.

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