summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/utils/DiffUtils.java
Commit message (Collapse)AuthorAgeFilesLines
* Fix for #976 - Filestore links via browserPaul Martin2015-12-251-4/+7
| | | | | | | | | | | | | + GitLFS client support + FilestoreModel now parses meta file + Read meta heading from cache if available + Authentication based on accept headers for browser view filestore login + PathModel & PathChangeModel now understands filestore items + Zip & Rar downloads contain include filestore items + Filestore servlet returns LFS JSON error only if accepted by client + DiffStat now knows repository to allow identification of filestore items + Filestore items identified and returned via view, raw & blob links on blame, commitDiff, commit and Tree pages
* Implement configurable tab length support for blob viewsJames Moger2015-05-221-16/+25
|
* Add links to commit diff and blob diff pages to toggle whitespace settingJames Moger2015-03-071-6/+14
|
* Add DiffComparator argument to all DiffUtils calls, default to ignore all ↵James Moger2015-03-071-18/+52
| | | | whitespace
* Image diffsTom2014-11-111-1/+96
| | | | | | | | | | | | | | | | | | | | | | | | Ticket 88: https://dev.gitblit.com/tickets/gitblit.git/88 Based on Lea Verou's pure CSS slider: http://lea.verou.me/2014/07/image-comparison-slider-with-pure-css/ * Add a callback interface, pass it through DiffUtils to the GitBlitDiffFormatter. Is needed because the rendering needs access to the repositoryName and other things that are known only at higher levels. * New class ImageDiffHandler responsible for rendering an image diff. Called for all binary diffs, doesn't do anything if it's not an image. HTML is generated via JSoup: no worries about forgetting to close a tag, not about HTML escaping, nor about XSS. * The 3 diff pages set up such an ImageDIffHandler and pass it along. * CSS changes: from Lea Verou, with some minor improvements. I think in the long run there'll be no way around rewriting the HTML diff formatter from scratch, not using the standard JGit DiffFormatter at all.
* Improve the commitdiff.Tom2014-11-061-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Optimize CSS: simplify selectors. That alone cuts rendering time in half! * Adapt HTML generation accordingly. * Change line number generation so that one can select only code lines. Also move the +/- out of the code column; it also gets in the way when selecting. * Omit long diffs altogether. * Omit diff lines for deleted files, they're not particularly interesting. * Introduce a global limit on the maximum number of diff lines to show. * Supply translations for the languages I speak for the new messages. https://code.google.com/p/gitblit/issues/detail?id=450 was about a diff with nearly 300k changed lines (with more then 3000 files deleted). But one doesn't have to have such a monster commit to run into problems. My FF 32 become unresponsive for the 30+ seconds it takes it to render a commitdiff with some 30000 changed lines. (90% of which are in two generated files; the whole commit has just 20 files.) GitHub has no problems showing a commitdiff for this commit, but omits the two large generated files, which makes sense. This change implements a similar thing. Files with too many diff lines get omitted from the output, only the header and a message that the diff is too large remains. Additionally, there's a global limit on the length of a commitdiff; if we exceed that, the whole diff is truncated and the files not shown are listed. The CSS change improves performance by not using descendant selectors for all these table cells. Instead, we assign them precise classes and just use that in the CSS. The line number generation thing using data attributes and a :before selector in the CSS, which enables text selections only in the code column, is not strictly XHTML 1.0. (Data attributes are a feature of HTML 5.) However, reasonably modern browsers also handle this correctly if the page claims to be XHTML 1.0. Besides, the commitdiff page isn't XHTML compliant anyway; I don't think a pre-element may contain divs or even tables. (Note that this technique could be used on other diff pages, too. For instance on the blame page.)
* [findbugs] Fix potential NPE in DiffStat generationJames Moger2014-04-171-3/+3
|
* Add method to calculate the diffstat between two commitsJames Moger2014-03-011-0/+32
|
* Trim trailing whitespace and organize importsJames Moger2013-09-301-19/+19
| | | | Change-Id: I9f91138b20219be6e3c4b28251487df262bff6cc
* Add normalized diffstats to the commit, commitdiff, and compare pagesJames Moger2013-09-271-19/+228
| | | | Change-Id: I8f26746a611e9ab955efe8b2597cc81db48fb085
* Removed GitWeb-style diff rendererJames Moger2013-09-181-7/+4
|
* Revised incremental push tags featureJames Moger2013-04-011-1/+2
|
* Reorganized to Apache Standard Directory Layout & integrated MoxieJames Moger2013-03-271-0/+281
This is a massive commit which reorganizes the entire project structure (although it is still monolithic), removes the Build classes, and switches to Moxie, a smarter Ant build tookit based on the original Gitblit Build classes. The Ant build script will likely require additional fine-tuning, but this is big step forward.