summaryrefslogtreecommitdiff
path: root/diff-stages.c
AgeCommit message (Collapse)Author
2006-04-10Retire diffcore-pathspec.Junio C Hamano
Nobody except diff-stages used it -- the callers instead filtered the input to diffcore themselves. Make diff-stages do that as well and retire diffcore-pathspec. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-22Move diff.renamelimit out of default configuration.Junio C Hamano
Otherwise we would end up linking all the unneeded stuff into git-daemon only to link with git_default_config. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-25Diff clean-up.Junio C Hamano
This is a long overdue clean-up to the code for parsing and passing diff options. It also tightens some constness issues. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-30[PATCH] Unify usage strings declarationPetr Baudis
All usage strings are now declared as static const char []. This is carried over from my old git-pb branch. Signed-off-by: Petr Baudis <pasky@ucw.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-15Split up "diff_format" into "format" and "line_termination".Linus Torvalds
This removes the separate "formats" for name and name-with-zero- termination. It also removes the difference between HUMAN and MACHINE formats, and they both become DIFF_FORMAT_RAW, with the difference being just in the line and inter-filename termination. It also makes the code easier to understand.
2005-07-13[PATCH] Clean up diff option descriptions.Junio C Hamano
I got tired of maintaining almost duplicated descriptions in diff-* brothers, both in usage string and documentation. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-13[PATCH] git-diff-*: --name-only and --name-only-z.Junio C Hamano
Porcelain layers often want to find only names of changed files, and even with diff-raw output format they end up having to pick out only the filename. Support --name-only (and --name-only-z for xargs -0 and cpio -0 users that want to treat filenames with embedded newlines sanely) flag to help them. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-13[PATCH] diff-stages: support "-u" as a synonym for "-p".Junio C Hamano
Just to be consistent, support "-u" as a synonym for "-p" like everybody else does. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-20Avoid gcc warning in diff-stages.cLinus Torvalds
Put explicit parentheses around && in ||-expression.
2005-06-20[PATCH] Make -C less eager.Junio C Hamano
Like diff-tree, this patch makes -C option for diff-* brothers to use only pre-image of modified files as rename/copy detection by default. Give --find-copies-harder to use unmodified files to find copies from as well. This also fixes "diff-files -C" problem earlier noticed by Linus. It was feeding the null sha1 even when the file in the work tree was known to match what is in the index file. This resulted in diff-files showing everything in the project. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-13[PATCH] diff-stages: unuglify the too big main() function.Junio C Hamano
Split the core of the program, diff_stage, from one big "main()" function that does it all and leave only the parameter parsing, setup and finalize part in the main(). Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-13[PATCH] Add --diff-filter= output restriction to diff-* family.Junio C Hamano
This is a halfway between debugging aid and a helper to write an ultra-smart merge scripts. The new option takes a string that consists of a list of "status" letters, and limits the diff output to only those classes of changes, with two exceptions: - A broken pair (aka "complete rewrite"), does not match D (deleted) or N (created). Use B to look for them. - The letter "A" in the diff-filter string does not match anything itself, but causes the entire diff that contains selected patches to be output (this behaviour is similar to that of --pickaxe-all for the -S option). For example, $ git-rev-list HEAD | git-diff-tree --stdin -s -v -B -C --diff-filter=BCR shows a list of commits that have complete rewrite, copy, or rename. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-09[PATCH] Add git-diff-stages command.Junio C Hamano
The diff-* brothers acquired a sibling, git-diff-stages. With an unmerged index file, you specify two stage numbers and it shows the differences between them. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>