summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst-rsrc
Commit message (Collapse)AuthorAgeFilesLines
* Fix patch application WRT windows line endings.Markus Duft2013-01-193-0/+18
| | | | | | | | | | | | Previously the result of an application would have been \r\r\n in the case of windows line endings, as RawText does not touch the \r, and ApplyCommand adds "\r\n" if this is the ending of the first line in the target file. Only always adding \n should be ok, since \r\n would be the result if the file and the patch include windows line endings. Also add according test. Change-Id: Ibd4c4948d81bd1c511ecf5fd6c906444930d236e
* Make ApplyCommand create missing parent directories for new filesMarkus Duft2012-07-161-0/+9
| | | | | | | | | | Otherwise applying will fail with a FileNotFoundException, because File.createNewFile() fails with missing parents. Contains change & according test. Change-Id: I970522b549b8bb260ca6720da11f12c57ee8a492 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Ignore trailing comments in transport SPI parsingKevin Sawicki2012-03-211-0/+7
| | | | | | | | | | Check for a '#' character in each line read and parse the leading characters as the class name of a TransportProtocol being registered via SPI. Bug: 373439 Change-Id: If36cb62c07ecea78ba0f326a87edf1d80b7b42b6 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Add ApplyCommand to JGit APITomasz Zarna2012-03-0410-0/+99
| | | | | | | Bug: 361548 CQ: 6243 Change-Id: I08e1369e142bb19f42a8d7bbb5a7d062cc8533fc Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Fix TestTranslationBundleRobin Rosenberg2010-12-314-0/+4
| | | | | | | | | | | The test was never run from maven, because its name did not end in a way that was recognized by the pom. After rename it failed because it did not find its resources. Rename test class and move resources to the resources folder Change-Id: I74a7ef1373cd902e1d05ff6ea38f8648b5fc5700 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* Fix ArrayIndexOutOfBoundsException in DirCacheIteratorShawn O. Pearce2010-12-221-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the 'TREE' extension contains an invalid subtree that has been removed, DirCacheIterator still tried to access it due to an invalid childCnt field within the parent DirCacheTree object. This is easy for a user to do, they just need to move all files out of a subdirectory. For example, the input for the JUnit test case for this bug was built using the following C Git sequence: mkdir -p a/b touch a/b/c q git add a/b/c q git write-tree git mv a/b/c a/a After the last step, the subdirectory a/b is empty, as its only file was moved into the parent directory. Because of the earlier `git write-tree` operation, there is a 'TREE' extension present, but the a and a/b subdirectories have been marked invalid by the rename. When JGit tried to iterate over the a tree, it tried to correct childCnt to be zero as a/b no longer exists, but it failed to update childCnt. Change-Id: I7a0f78fc48a36b1a83252d354618f6807fca0426 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Extend DirCache test case to check "intent to add" flag.Marc Strapetz2010-08-311-0/+0
|
* Partial support for index file format "3".Marc Strapetz2010-08-311-0/+0
| | | | | | | | Extended flags are processed and available via DirCacheEntry's new isSkipWorkTree() and isIntentToAdd() methods. "resolve-undo" information is completely ignored since its an optional extension. Change-Id: Ie6e9c6784c9f265ca3c013c6dc0e6bd29d3b7233
* Move ignore node handling into WorkingTreeIteratorShawn O. Pearce2010-07-219-4/+0
| | | | | | | | | | | | | | | The working tree iterator has perfect knowledge of the path structure as well as immediate information about whether or not an ignore file even exists at this level. We can exploit that to simplify the logic and running time for testing ignored file status by pushing all of the checks down into the iterator itself. Change-Id: I22ff534853e8c5672cc5c2d9444aeb14e294070e Signed-off-by: Shawn O. Pearce <spearce@spearce.org> CC: Charley Wang <chwang@redhat.com> CC: Chris Aniszczyk <caniszczyk@gmail.com> CC: Stefan Lay <stefan.lay@sap.com> CC: Matthias Sohn <matthias.sohn@sap.com>
* Add compatibility with gitignore specificationsCharley Wang2010-07-1311-0/+8
| | | | | | | | | | | | | | | This patch adds ignore compatibility to jgit. It encompasses exclude files as well as .gitignore. Uses TreeWalk and FileTreeIterator to find nodes and parses .gitignore files when required. The patch includes a simple cache that can be used to save results and avoid excessive gitignore parsing. CQ: 4302 Bug: 303925 Change-Id: Iebd7e5bb534accca4bf00d25bbc1f561d7cad11b Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com> Signed-off-by: Stefan Lay <stefan.lay@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Correctly skip over unrecognized optional dircache extensionsShawn O. Pearce2010-02-023-0/+0
| | | | | | | | | | | | | | | | | | | We didn't skip the correct number of bytes when we skipped over an unrecognized but optional dircache extension. We missed skipping the 8 byte header that makes up the extension's name and length. We also didn't include the skipped extension's payload as part of our index checksum, resuting in a checksum failure when the index was done reading. So ensure we always scan through a skipped section and include it in the checksum computation. Add a test case for a currently unsupported index extension, 'ZZZZ', to verify we can still read the DirCache object even though we don't know what 'ZZZZ' is supposed to mean. Bug: 301287 Change-Id: I4bdde94576fffe826d0782483fd98cab1ea628fa Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Added -crfl attribute for DiffFormatterReflowTest test dataConstantine Plotnikov2009-12-271-0/+3
| | | | | | | | | | | The test data is expected to have unix new lines by tests, but it is converted to crlf on Windows platform (with msys git). As result DiffFormatterReflowTest tests fail. To prevent this problem, crlf conversion is disbled for test data related to that test. Bug: 295077 Change-Id: I67d3ed543fcc38647041896146de12b1781ec6be Signed-off-by: Constantine Plotnikov <constantine.plotnikov@gmail.com>
* Initial JGit contribution to eclipse.orgGit Development Community2009-09-2963-0/+2977
Per CQ 3448 this is the initial contribution of the JGit project to eclipse.org. It is derived from the historical JGit repository at commit 3a2dd9921c8a08740a9e02c421469e5b1a9e47cb. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>