aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextIgnoreTrailingWhitespace.java
Commit message (Collapse)AuthorAgeFilesLines
* Refactor diff sequence APIShawn O. Pearce2010-09-061-111/+0
| | | | | | | | | | | | | | | Instead of making the sequence itself responsible for the equivalence function, use an external function that is supplied by the caller. This cleans up the code because we now say cmp.equals(a, ai, b, bi) instead of a.equals(ai, b, bi). This refactoring also removes the odd concept of creating different types of sequences to have different behaviors for whitespace ignoring. Instead DiffComparator now supports singleton functions that apply a particular equivalence algorithm to a type of sequence. Change-Id: I559f494d81cdc6f06bfb4208f60780c0ae251df9 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Use int[] rather than IntList for RawText hashesShawn O. Pearce2010-09-011-1/+1
| | | | | | | | | | | | We know exactly how many lines we need by the time we compute our per-line hashes, as we have already built the lines IntList to give us the starting position of each line in the buffer. Using that we can properly size the array, and don't need the dynamic growing feature of IntList. So drop the indirection and just use a fixed size array. Change-Id: I5c8c592514692a8abff51e5928aedcf71e100365 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* log: Add whitespace ignore optionsShawn O. Pearce2010-07-031-0/+7
| | | | | | | | | | | | | | Similar to what we did with diff, implement whitespace ignore options for log too. This requires us to define some means of creating any RawText object type at will inside of DiffFormatter, so we define a new factory interface to construct RawText instances on demand. Unfortunately we have to copy the entire block of common options. args4j only processes the options/arguments on the one command class and Java doesn't support multiple inheritance. Change-Id: Ia16cd3a11b850fffae9fbe7b721d7e43f1d0e8a5 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Added further support for whitespace ignoring during diffJeff Schumacher2010-06-281-0/+104
Added code to support ignoring leading, trailing, and changed whitespace when performing a diff operation. I also added command line options to Diff to enable the various whitespace ignoring methods. These match the flags for git diff. Change-Id: Ie56301aafad59ee3f0fe5de62719f5023cd702c8