aboutsummaryrefslogtreecommitdiff
path: root/Documentation/diff-options.txt
Commit message (Collapse)AuthorAge
* doc: clarify how -S worksJeff King2009-03-19
| | | | | | | | | | | | | | | | | The existing text was very vague about what exactly it means for difference to "contain" a change. This seems to cause confusion on the mailing list every month or two. To fix it we: 1. use "introduce or remove an instance of" instead of "contain" 2. point the user to gitdiffcore(7), which contains a more complete explanation Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'js/diff-color-words'Junio C Hamano2009-01-25
|\ | | | | | | | | | | | | | | | | | | | | | | | | * js/diff-color-words: Change the spelling of "wordregex". color-words: Support diff.wordregex config option color-words: make regex configurable via attributes color-words: expand docs with precise semantics color-words: enable REG_NEWLINE to help user color-words: take an optional regular expression describing words color-words: change algorithm to allow for 0-character word boundaries color-words: refactor word splitting and use ALLOC_GROW() Add color_fwrite_lines(), a function coloring each line individually
| * color-words: Support diff.wordregex config optionBoyd Stephen Smith Jr2009-01-21
| | | | | | | | | | | | | | | | | | | | | | | | When diff is invoked with --color-words (w/o =regex), use the regular expression the user has configured as diff.wordregex. diff drivers configured via attributes take precedence over the diff.wordregex-words setting. If the user wants to change them, they have their own configuration variables. Signed-off-by: Boyd Stephen Smith Jr <bss@iguanasuicide.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * color-words: make regex configurable via attributesThomas Rast2009-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the --color-words splitting regular expression configurable via the diff driver's 'wordregex' attribute. The user can then set the driver on a file in .gitattributes. If a regex is given on the command line, it overrides the driver's setting. We also provide built-in regexes for the languages that already had funcname patterns, and add an appropriate diff driver entry for C/++. (The patterns are designed to run UTF-8 sequences into a single chunk to make sure they remain readable.) Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * color-words: expand docs with precise semanticsThomas Rast2009-01-17
| | | | | | | | | | Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * color-words: take an optional regular expression describing wordsJohannes Schindelin2009-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some applications, words are not delimited by white space. To allow for that, you can specify a regular expression describing what makes a word with git diff --color-words='[A-Za-z0-9]+' Note that words cannot contain newline characters. As suggested by Thomas Rast, the words are the exact matches of the regular expression. Note that a regular expression beginning with a '^' will match only a word at the beginning of the hunk, not a word at the beginning of a line, and is probably not what you want. This commit contains a quoting fix by Thomas Rast. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | diff-options.txt: Fix asciidoc markup issueTeemu Likonen2009-01-25
| | | | | | | | | | | | | | Must be "--patience::", not "--patience:". Signed-off-by: Teemu Likonen <tlikonen@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'js/patience-diff'Junio C Hamano2009-01-23
|\ \ | |/ |/| | | | | | | | | | | | | | | * js/patience-diff: bash completions: Add the --patience option Introduce the diff option '--patience' Implement the patience diff algorithm Conflicts: contrib/completion/git-completion.bash
| * Introduce the diff option '--patience'Johannes Schindelin2009-01-07
| | | | | | | | | | | | | | | | This commit teaches Git to produce diff output using the patience diff algorithm with the diff option '--patience'. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Fix Documentation typos surrounding the word 'handful'.Jon Loeliger2009-01-13
| | | | | | | | | | | | | | | | Some instances replaced by "handful of", others use the word "few", a couple get a slight rewording. Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'rs/diff-ihc'Junio C Hamano2009-01-07
|\ \ | | | | | | | | | | | | | | | | | | | | | * rs/diff-ihc: diff: add option to show context between close hunks Conflicts: Documentation/diff-options.txt
| * | diff: add option to show context between close hunksRené Scharfe2008-12-29
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge two hunks if there is only the specified number of otherwise unshown context between them. For --inter-hunk-context=1, the resulting patch has the same number of lines but shows uninterrupted context instead of a context header line in between. Patches generated with this option are easier to read but are also more likely to conflict if the file to be patched contains other changes. This patch keeps the default for this option at 0. It is intended to just make the feature available in order to see its advantages and downsides. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Documentation/diff-options.txt: unify optionsjidanni@jidanni.org2008-12-29
|/ | | | | | | | | Instead of listing short option (e.g. "-U<n>") as a shorthand for its longer counterpart (e.g. "--unified=<n>"), list the synonyms together. It saves one indirection to find what the reader wants. Signed-off-by: jidanni <jidanni@jidanni.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2008-10-18
|\ | | | | | | | | | | | | | | | | * maint: Hopefully the final draft release notes update before 1.6.0.3 diff(1): clarify what "T"ypechange status means contrib: update packinfo.pl to not use dashed commands force_object_loose: Fix memory leak tests: shell negation portability fix
| * diff(1): clarify what "T"ypechange status meansJunio C Hamano2008-10-18
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | diff --dirstat-by-file: count changed files, not linesHeikki Orsila2008-09-05
| | | | | | | | | | | | | | | | | | This new option --dirstat-by-file is the same as --dirstat, but it counts "impacted files" instead of "impacted lines" (lines that are added or removed). Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2008-09-02
|\ \ | |/ | | | | | | | | | | | | | | | | * maint: Makefile: add merge_recursive.h to LIB_H Improve documentation for --dirstat diff option Bring local clone's origin URL in line with that of a remote clone Documentation: minor cleanup in a use case in 'git stash' manual Documentation: fix disappeared lines in 'git stash' manpage Documentation: fix reference to a for-each-ref option
| * Improve documentation for --dirstat diff optionHeikki Orsila2008-09-01
| | | | | | | | | | Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | reword --full-index descriptionJim Meyering2008-08-19
|/ | | | | Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: fix links to tutorials and other new manual pagesJonathan Nieder2008-07-01
| | | | | | | | | | | | | | | | | | | With the conversion of HTML documentation to man pages tutorial.html -> gittutorial (7) tutorial-2.html -> gittutorial-2 (7) cvs-migration.html -> gitcvs-migration (7) diffcore.html -> gitdiffcore (7) repository-layout.html -> gitrepository-layout (5) hooks.html -> githooks (5) glossary.html -> gitglossary (7) core-tutorial.html -> gitcore-tutorial (7) and the automatic update of references to these pages, a little debris was left behind. We clear it away. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* documentation: convert "diffcore" and "repository-layout" to man pagesChristian Couder2008-06-06
| | | | | | | | | | | | | This patch renames the following documents and at the same time converts them to the man format: diffcore.txt -> gitdiffcore.txt (man section 7) repository-layout.txt -> gitrepository-layout.txt (man section 5) Other documents that reference the above ones are changed accordingly. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* diff options: Introduce --ignore-submodulesJohannes Schindelin2008-05-15
| | | | | | | | | | | | | | The new option --ignore-submodules can now be used to ignore changes in submodules. Why? Sometimes it is not interesting when a submodule changed. For example, when reordering some commits in the superproject, a dirty submodule is usually totally uninteresting. So we will use this option in git-rebase to test for a dirty working tree. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint-1.5.4' into maintJunio C Hamano2008-04-22
|\ | | | | | | | | | | | | | | | | | | * maint-1.5.4: svn-git: Use binmode for reading/writing binary rev maps diff options documentation: refer to --diff-filter in --name-status git-svn bug with blank commits and author file archive.c: format_subst - fixed bogus argument to memchr copy.c: copy_fd - correctly report write errors gitattributes: Fix subdirectory attributes specified from root directory
| * diff options documentation: refer to --diff-filter in --name-statusMiklos Vajna2008-04-22
| | | | | | | | | | | | | | | | git diff --name-status outputs letters, but the meaning of those letters is documented elsewhere. Add a note to make the manpage more intuitive. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | diff-options.txt: document the new "--dirstat" optionGerrit Pape2008-04-21
| | | | | | | | | | | | | | | | | | | | | | This commit adds the documentation for the new option added by 7df7c01 (Add "--dirstat" for some directory statistics, 2008-02-12). Noticed by Clint Adams, reported through http://bugs.debian.org/476437 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | diff --relative: help working in a bare repositoryJunio C Hamano2008-02-13
| | | | | | | | | | | | | | | | | | This allows the --relative option to say which subdirectory to pretend to be in, so that in a bare repository, you can say: $ git log --relative=drivers/ v2.6.20..v2.6.22 -- drivers/scsi/ Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | diff --relative: output paths as relative to the current subdirectoryJunio C Hamano2008-02-13
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds --relative option to the diff family. When you start from a subdirectory: $ git diff --relative shows only the diff that is inside your current subdirectory, and without $prefix part. People who usually live in subdirectories may like it. There are a few things I should also mention about the change: - This works not just with diff but also works with the log family of commands, but the history pruning is not affected. In other words, if you go to a subdirectory, you can say: $ git log --relative -p but it will show the log message even for commits that do not touch the current directory. You can limit it by giving pathspec yourself: $ git log --relative -p . This originally was not a conscious design choice, but we have a way to affect diff pathspec and pruning pathspec independently. IOW "git log --full-diff -p ." tells it to prune history to commits that affect the current subdirectory but show the changes with full context. I think it makes more sense to leave pruning independent from --relative than the obvious alternative of always pruning with the current subdirectory, which would break the symmetry. - Because this works also with the log family, you could format-patch a single change, limiting the effect to your subdirectory, like so: $ cd gitk-git $ git format-patch -1 --relative 911f1eb But because that is a special purpose usage, this option will never become the default, with or without repository or user preference configuration. The risk of producing a partial patch and sending it out by mistake is too great if we did so. - This is inherently incompatible with --no-index, which is a bolted-on hack that does not have much to do with git itself. I didn't bother checking and erroring out on the combined use of the options, but probably I should. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: rename gitlink macro to linkgitDan McGee2008-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock Asciidoc configuration: @@ -149,7 +153,10 @@ # Inline macros. # Backslash prefix required for escape processing. # (?s) re flag for line spanning. -(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])= + +# Explicit so they can be nested. +(?su)[\\]?(?P<name>(http|https|ftp|file|mailto|callto|image|link)):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])= + # Anchor: [[[id]]]. Bibliographic anchor. (?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3 # Anchor: [[id,xreflabel]] This default regex now matches explicit values, and unfortunately in this case gitlink was being matched by just 'link', causing the wrong inline macro template to be applied. By renaming the macro, we can avoid being matched by the wrong regex. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Teach diff machinery to display other prefixes than "a/" and "b/"Johannes Schindelin2007-12-20
| | | | | | | | | | | | | With the new options "--src-prefix=<prefix>", "--dst-prefix=<prefix>" and "--no-prefix", you can now control the path prefixes of the diff machinery. These used to by hardwired to "a/" for the source prefix and "b/" for the destination prefix. Initial patch by Pascal Obry. Sane option names suggested by Linus. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* "diff --check" should affect exit statusWincent Colaiuta2007-12-13
| | | | | | | | | | | | "git diff" has a --check option that can be used to check for whitespace problems but it only reported by printing warnings to the console. Now when the --check option is used we give a non-zero exit status, making "git diff --check" nicer to use in scripts and hooks. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Use "whitespace" consistentlyWincent Colaiuta2007-12-12
| | | | | | | | | For consistency, change "white space" and "whitespaces" to "whitespace", fixing a couple of adjacent grammar problems in the docs. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Include diff options in the git-log manpageMiklos Vajna2007-12-05
| | | | | | | [jc: with quite a few fixups] Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: customize diff-options depending on particular commandSergei Organov2007-11-15
| | | | | | | | | | | | | | | | | | | | | Customize diff-options depending on particular command as follows, mostly to make git-diff and git-format-patch manuals less confusing: * git-format-patch: - Mark --patch-with-stat as being the default. - Change -p description so that it matches what it actually does and so that it doesn't refer to absent "section on generating patches". * git-diff: mark -p as being the default. * git-diff-index/git-diff-files/git-diff-tree: mark --raw as being the default. Signed-off-by: Sergei Organov <osv@javad.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fixed link in documentation of diff-optionsSteffen Prohaska2007-10-01
| | | | | Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Update description of -z option.Junio C Hamano2007-07-25
| | | | | | | The NUL you see in "git log" (without diff) output are between records, not at the end of each record. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Document --unified/-U optionRobin Rosenberg2007-07-25
| | | | | Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add diff-option --ext-diffJohannes Schindelin2007-07-03
| | | | | | | | | | | | | | | | | To prevent funky games with external diff engines, git-log and friends prevent external diff engines from being called. That makes sense in the context of git-format-patch or git-rebase. However, for "git log -p" it is not so nice to get the message that binary files cannot be compared, while "git diff" has no problems with them, if you provided an external diff driver. With this patch, "git log --ext-diff -p" will do what you expect, and the option "--no-ext-diff" can be used to override that setting. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Teach diff to imply --find-copies-harder upon -C -CJohannes Schindelin2007-06-12
| | | | | | | | | | Earlier, a second "-C" on the command line had no effect. But "--find-copies-harder" is so long to type, let's make doubled -C enable that option. It is in line with how "git blame" handles such doubled options to mean "work harder". Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* War on whitespaceJunio C Hamano2007-06-07
| | | | | | | | | This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Document --quiet option to git-diffAlex Riesen2007-03-24
| | | | | Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Allow git-diff exit with codes similar to diff(1)Alex Riesen2007-03-14
| | | | | | | | | This introduces a new command-line option: --exit-code. The diff programs will return 1 for differences, return 0 for equality, and something else for errors. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document --ignore-space-at-eol option.Junio C Hamano2007-02-14
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document --check option to git diff.Bill Lear2007-01-27
| | | | | Signed-off-by: Bill Lear <rael@zopyra.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document --numstat in git-apply and git-diffJunio C Hamano2006-12-26
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* make commit message a little more consistent and confortingNicolas Pitre2006-12-15
| | | | | | | | | | | | It is nicer to let the user know when a commit succeeded all the time, not only the first time. Also the commit sha1 is much more useful than the tree sha1 in this case. This patch also introduces a -q switch to supress this message as well as the summary of created/deleted files. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document git-diff whitespace flags -b and -wJakub Narebski2006-12-04
| | | | | | | | | | | | Document git diff options -b / --ignore-space-change and -w / --ignore-all-space, introduced by Johannes Schindelin in commit 0d21efa5, "Teach diff about -b and -w flags". The description of options is taken from GNU diff man page and GNU Diffutils info documentation. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* diff --numstatJunio C Hamano2006-10-13
| | | | | | [jc: with documentation from Jakub] Signed-off-by: Junio C Hamano <junkio@cox.net>
* diff --stat=width[,name-width]: allow custom diffstat output width.Linus Torvalds2006-09-28
| | | | | Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add the --color-words option to the diff options familyJohannes Schindelin2006-08-10
| | | | | | | | | With this option, the changed words are shown inline. For example, if a file containing "This is foo" is changed to "This is bar", the diff will now show "This is " in plain text, "foo" in red, and "bar" in green. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Update diff-options and config documentation.Junio C Hamano2006-07-07
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>