summaryrefslogtreecommitdiff
path: root/diff-helper.c
AgeCommit message (Collapse)Author
2005-05-20sparse cleanupLinus Torvalds
Fix various things that sparse complains about: - use NULL instead of 0 - make sure we declare everything properly, or mark it static - use proper function declarations ("fn(void)" instead of "fn()") Sparse is always right.
2005-05-20[PATCH] diff overhaulJunio C Hamano
This cleans up the way calls are made into the diff core from diff-tree family and diff-helper. Earlier, these programs had "if (generating_patch)" sprinkled all over the place, but those ugliness are gone and handled uniformly from the diff core, even when not generating patch format. This also allowed diff-cache and diff-files to acquire -R (reverse) option to generate diff in reverse. Users of diff-tree can swap two trees easily so I did not add -R there. [ Linus' note: I'll add -R to "diff-tree" too, since a "commit diff" doesn't have another tree to switch around: the other tree is always the parent(s) of the commit ] Also -M<digits-as-mantissa> suggestion made by Linus has been implemented. Documentation updates are also included. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-19[PATCH] Detect renames in diff family.Junio C Hamano
This rips out the rename detection engine from diff-helper and moves it to the diff core, and updates the internal calling convention used by diff-tree family into the diff core. In order to give the same option name to diff-tree family as well as to diff-helper, I've changed the earlier diff-helper '-r' option to '-M' (stands for Move; sorry but the natural abbreviation 'r' for 'rename' is already taken for 'recursive'). Although I did a fair amount of test with the git-diff-tree with existing rename commits in the core GIT repository, this should still be considered beta (preview) release. This patch depends on the diff-delta infrastructure just committed. This implements almost everything I wanted to see in this series of patch, except a few minor cleanups in the calling convention into diff core, but that will be a separate cleanup patch. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-18diff-helper: pass unrecognized lines through unmodifiedLinus Torvalds
(and flush any pending renames)
2005-05-18[PATCH] Diff-helper updateJunio C Hamano
This patch adds a framework and a stub implementation of rename detection to diff-helper program. The current stub code is just enough to detect pure renames in diff-tree output and not fancier. The plan is perhaps to use the same delta code when Nico's delta storage patch is merged for similarity evaluation purposes. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-15[PATCH 3/3] Rename git-diff-tree-helper to git-diff-helper (part 2).Junio C Hamano
It used to be that diff-tree needed helper support to parse its raw output to generate diffs, but these days git-diff-* family produces the same output and the helper is not tied to diff-tree anymore. Drop "tree" from its name. This follows the "rename only" commit to adjust the contents of the files involved. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Petr Baudis <pasky@ucw.cz>
2005-05-15[PATCH 2/3] Rename git-diff-tree-helper to git-diff-helper.Junio C Hamano
It used to be that diff-tree needed helper support to parse its raw output to generate diffs, but these days git-diff-* family produces the same output and the helper is not tied to diff-tree anymore. Drop "tree" from its name. This commit is done separately to record just the rename and no file content changes. The changes in the renamed files are recorded in the next commit. Signed-off-by: Junio C Hamano <junkio@cox.net> Bundled with the changes in the unrenamed files. Signed-off-by: Petr Baudis <pasky@ucw.cz>