summaryrefslogtreecommitdiff
path: root/Documentation/diff-config.txt
AgeCommit message (Collapse)AuthorFilesLines
2012-12-07Documentation/diff-config: work around AsciiDoc misfortuneLibravatar Junio C Hamano1-2/+2
The line that happens to begin with indent followed by "3. " was interpreted as if it was an enumerated list; just wrap the lines differently to work it around for now. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18diff: introduce diff.submodule configuration variableLibravatar Ramkumar Ramachandra1-0/+7
Introduce a diff.submodule configuration variable corresponding to the '--submodule' command-line option of 'git diff'. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18Documentation: move diff.wordRegex from config.txt to diff-config.txtLibravatar Ramkumar Ramachandra1-0/+6
19299a8 (Documentation: Move diff.<driver>.* from config.txt to diff-config.txt, 2011-04-07) moved the diff configuration options to diff-config.txt, but forgot about diff.wordRegex, which was left behind in config.txt. Fix this. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-30diff: diff.context configuration gives default to -ULibravatar Jeff Muizelaar1-0/+4
Introduce a configuration variable diff.context that tells Porcelain commands to use a non-default number of context lines instead of 3 (the default). With this variable, users do not have to keep repeating "git log -U8" from the command line; instead, it becomes sufficient to say "git config diff.context 8" just once. Signed-off-by: Jeff Muizelaar <jmuizelaar@mozilla.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-19Documentation: spelling fixesLibravatar Miklos Vajna1-1/+1
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-01diff --stat: add config option to limit graph widthLibravatar Zbigniew Jędrzejewski-Szmek1-0/+4
Config option diff.statGraphWidth=<width> is equivalent to --stat-graph-width=<width>, except that the config option is ignored by format-patch. For the graph-width limiting to be usable, it should happen 'automatically' once configured, hence the config option. Nevertheless, graph width limiting only makes sense when used on a wide terminal, so it should not influence the output of format-patch, which adheres to the 80-column standard. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-29New --dirstat=lines mode, doing dirstat analysis based on diffstatLibravatar Johan Herland1-0/+8
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 > /dev/null vs. time git diff v2.6.20..v2.6.30 --dirstat=lines > /dev/null vs. time git diff v2.6.20..v2.6.30 --dirstat=files > /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 <gitster@pobox.com> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-29Add config variable for specifying default --dirstat behaviorLibravatar Johan Herland1-0/+36
The new diff.dirstat config variable takes the same arguments as '--dirstat=<args>', and specifies the default arguments for --dirstat. The config is obviously overridden by --dirstat arguments passed on the command line. When not specified, the --dirstat defaults are 'changes,noncumulative,3'. The patch also adds several tests verifying the interaction between the diff.dirstat config variable, and the --dirstat command line option. Improved-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-06Documentation: Allow custom diff tools to be specified in 'diff.tool'Libravatar Ramkumar Ramachandra1-6/+8
Apart from the list of "valid values", 'diff.tool' can take any value, provided there is a corresponding 'difftool.<tool>.cmd' option. Also, describe this option just before the 'difftool.*' options. Helped-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-06Documentation: Add diff.<driver>.* to configLibravatar Ramkumar Ramachandra1-0/+28
Although the gitattributes page contains comprehensive information about these configuration options, they should be included in the config documentation for completeness. It may be better to rename the "driver" in "diff.<driver>.*" to something like "content type" or "file type", but for now, let's keep it consistent across this part of the documentation and the original description in the gitattributes documentation. Helped-by: Jakub Narebski <jnareb@gmail.com> Helped-by: Michael J Gruber <git@drmicha.warpmail.net> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-06Documentation: Move diff.<driver>.* from config.txt to diff-config.txtLibravatar Ramkumar Ramachandra1-0/+62
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>