summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Let ObjectWalk.markUninteresting also mark the root tree as"David Ostrovsky2015-04-261-15/+0
| | | | | | | | | | | | The Iff2de881 tried to fix missing tree ..." but introduced severe performance degradation (>10x in some cases) when acting as server (git push) and as client (replication). IOW cure is worse than the disease. This reverts commit c4797fe98655b3d52d0a90ba44fce6e053db3b8b. Change-Id: I4e6056eb352d51277867f857a0cab380eca153ac Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* JGit v3.7.0.201502260915-rv3.7.0.201502260915-rMatthias Sohn2015-02-262-2/+2
| | | | | Change-Id: Iec17746cad81cfb1d775e782b30f9d8a13c938b6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Read user.name and email from environment firstMatthias Sohn2015-02-241-0/+17
| | | | | | | | | | | | | | | | | | | According to [1] user name and email are taken first from the environment variables: GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL In case (some of) these environment variables are not set, the information is taken from the git configuration. JGit doesn not yet support the environment variables GIT_AUTHOR_DATE and GIT_COMMITTER_DATE. [1] https://www.kernel.org/pub/software/scm/git/docs/git-commit-tree.html#_commit_information Bug: 460586 Change-Id: I3ba582b4ae13674cf319652b5b13ebcbb96dd8ec Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare post 3.7.0.201502031740-rc1 buildsMatthias Sohn2015-02-042-2/+2
| | | | Change-Id: Id3728e771a4441757de016cc9d68055f668126b0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.7.0.201502031740-rc1v3.7.0.201502031740-rc1Matthias Sohn2015-02-032-2/+2
| | | | | Change-Id: Ia2ea65945b7e1d4120da3d6e6c9f6d5fdb642ae6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix FileUtils.testRelativize_mixedCase which failed on Mac OS XMatthias Sohn2015-02-021-19/+8
| | | | | | | HFS is case insensitive hence expecting it to return the result for case sensitive filesystem doesn't work. Change-Id: I292eab78e50711529a0412f9a54e174a3ac16109 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Introduce hook support into the FS implementationsLaurent Goubet2015-02-021-0/+79
| | | | | | | | | | | This introduces the background plumbing necessary to run git hooks from JGit. This implementation will be OS-dependent as it aims to be compatible with existing hooks, mostly written in Shell. It is compatible with unix systems and windows as long as an Unix emulator such as Cygwin is in its PATH. Change-Id: I1f82a5205138fd8032614dd5b52aef14e02238ed Signed-off-by: Laurent Goubet <laurent.goubet@obeo.fr> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix RawText.getLineDelimiter() for empty first lineFrank Wagner2015-01-171-0/+7
| | | | | | Bug: 456776 Change-Id: Iae50be89ea6d5aee33bd938a937ac5ca578aabca Signed-off-by: Frank Wagner <frank.wagner@fr.ibm.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add basic support for .gitattributesArthur Daussy2015-01-076-0/+1250
| | | | | | | | | | | | | | | | | | | | | | Core classes to parse and process .gitattributes files including support for reading attributes in WorkingTreeIterator and the dirCacheIterator. The implementation follows the git ignore implementation. It supports lazy reading attributes while walking the working tree. Bug: 342372 CQ: 9078 Change-Id: I05f3ce1861fbf9896b1bcb7816ba78af35f3ad3d Also-by: Marc Strapetz <marc.strapetz@syntevo.com> Also-by: Gunnar Wagenknecht <gunnar@wagenknecht.org> Also-by: Arthur Daussy <arthur.daussy@obeo.fr> Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org> Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com> Signed-off-by: Arthur Daussy <arthur.daussy@obeo.fr> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* AIOOB in ChangeIdUtil.indexOfChangeId if amended message is a newlineAndrey Loskutov2015-01-061-0/+4
| | | | | Bug: 456792 Change-Id: Idf38a0db7dc72d672ff185dcac2f41f0012a6673 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
* Merge branch 'stable-3.6'Matthias Sohn2015-01-043-32/+157
|\ | | | | | | | | | | | | | | | | | | | | * stable-3.6: Prepare 3.6.2-SNAPSHOT builds JGit v3.6.1.201501031845-r Trim author/committer name and email in commit header Rename detection should canonicalize line endings PathMatcher should respect "assumeDirectory" flag Change-Id: Idd48c6d94cf1ab09abc07f70d50890b1b78e1833 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 3.6.2-SNAPSHOT buildsMatthias Sohn2015-01-042-39/+39
| | | | | | | | | | Change-Id: I9699d84af2d4b5382d8ee88ed3517d6b91305421 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v3.6.1.201501031845-rv3.6.1.201501031845-rMatthias Sohn2015-01-042-2/+2
| | | | | | | | | | Change-Id: I56e235a271f90ea2d8cdb7d99706f726d4a59c43 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Trim author/committer name and email in commit headerRüdiger Herrmann2015-01-031-0/+12
| | | | | | | | | | | | | | | | | | | | | | C Git trims name and email before inserting them into the commit header so that " A U Thor " and " author@example.com " becomes "A U Thor <author@example.com>" with a single separating space. This changes PersonIdent#toExternalString() to trim name and email before concatenating them. Change-Id: Idd77b659d0db957626824f6632e2da38d7731625 Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
| * Rename detection should canonicalize line endingsMarc Strapetz2015-01-021-18/+44
| | | | | | | | | | | | | | | | | | | | Native Git canonicalizes line endings when detecting renames, more specifically it replaces CRLF by LF. See: hash_chars in diffcore-delta.c Bug: 449545 Change-Id: Iec2aab12ae9e67074cccb7fbd4d9defe176a0130 Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * PathMatcher should respect "assumeDirectory" flagAndrey Loskutov2014-12-281-14/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The path matcher should not fail if the rule ends with trailing slash, target pattern does not ends with the slash and the "assumeDirectory" flag is set. E.g. */bin/ should also match a/bin if this pattern is threated as directory by WorkingTreeIterator (FileMode.TREE). The old code/tests have never tested directory rules with patterns *without* trailing slashes but with the "assumeDirectory" flag set. Unfortunately this is exactly what WorkingTreeIterator does... The tests are changed to test *both* cases now (with trailing slash and without) if the target pattern has trailing slash (represents directory). Bug: 454672 Change-Id: I621c1644d9e94df3eb9f6f09c6de0fe51f0950a4 Also-by: Markus Duft <markus.duft@salomon.at> Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
* | Prepare 3.7.0-SNAPSHOT buildsMatthias Sohn2014-12-242-39/+39
|/ | | | | Change-Id: Ib3e7b5f46ee1e27b9cf25b3b2d01d681a5c4904c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.6.1-SNAPSHOT buildsMatthias Sohn2014-12-232-39/+39
| | | | | Change-Id: Ie620c90ffafbffc6755b4e1ed55a61a15b118a2a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.6.0.201412230720-rv3.6.0.201412230720-rMatthias Sohn2014-12-232-2/+2
| | | | | Change-Id: Ic28e2bbbdb1099e948c64a005c39f6b8d8ac69a8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix unit tests for windows by explicitly closing test reposChristian Halstrick2014-12-221-0/+3
| | | | Change-Id: If5f67d739f744f19b45e6f5c7597a213fd5bf025
* Merge branch 'stable-3.5' into stable-3.6Matthias Sohn2014-12-1914-59/+338
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.5: JGit v3.5.3.201412180710-r JGit v3.4.2.201412180340-r ObjectChecker: Disallow names potentially mapping to ".git" on HFS+ ObjectChecker: Disallow Windows shortname "GIT~1" ObjectChecker: Disallow ".git." and ".git<space>" Always ignore case when forbidding .git in ObjectChecker DirCache: Refuse to read files with invalid paths DirCache: Replace isValidPath with DirCacheCheckout.checkValidPath Replace "a." with "a-" in unit tests Apache HttpClientConnection: replace calls to deprecated LocalFile() Fix two nits about DirCacheEntry constructors Detect buffering failures while writing rebase todo file Deprecate TemporaryBuffer.LocalFile without parent directory Switch FileHeader.extractFileLines to TemporaryBuffer.Heap AmazonS3: Buffer pushed pack content under $GIT_DIR DirCache: Buffer TREE extension to $GIT_DIR Change-Id: Iee8acbaa9d4d9047b550641db1b8845d64530785 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v3.5.3.201412180710-rv3.5.3.201412180710-rstable-3.5Matthias Sohn2014-12-182-2/+2
| | | | | | | | | | Change-Id: Iadbd460da494c04fba71f98c200d6b65ce1709c6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-3.4' into stable-3.5Matthias Sohn2014-12-1814-59/+338
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.4: JGit v3.4.2.201412180340-r ObjectChecker: Disallow names potentially mapping to ".git" on HFS+ ObjectChecker: Disallow Windows shortname "GIT~1" ObjectChecker: Disallow ".git." and ".git<space>" Always ignore case when forbidding .git in ObjectChecker DirCache: Refuse to read files with invalid paths DirCache: Replace isValidPath with DirCacheCheckout.checkValidPath Replace "a." with "a-" in unit tests Apache HttpClientConnection: replace calls to deprecated LocalFile() Fix two nits about DirCacheEntry constructors Detect buffering failures while writing rebase todo file Deprecate TemporaryBuffer.LocalFile without parent directory Switch FileHeader.extractFileLines to TemporaryBuffer.Heap AmazonS3: Buffer pushed pack content under $GIT_DIR DirCache: Buffer TREE extension to $GIT_DIR Change-Id: I398cf40b006a05a6537788fc6eb1f84df1ed8814 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v3.4.2.201412180340-rv3.4.2.201412180340-rstable-3.4Matthias Sohn2014-12-182-2/+2
| | | | | | | | | | | | | | | Change-Id: Ie088cf129b04ec64738edbc8c3ce25aa43b557ca Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * ObjectChecker: Disallow names potentially mapping to ".git" on HFS+Matthias Sohn2014-12-181-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mac's HFS+ folds concatentations of ".git" and ignorable Unicode characters [1] to ".git" [2]. Hence we need to disallow all names which could potentially be a shortname for ".git". Example: in an empty directory create a folder ".g\U+200Cit". Now you can't create another folder ".git". The following characters are ignorable Unicode which are ignored on HFS+: unicode hex name ------------------------------------------------- U+200C 0xe2808c ZERO WIDTH NON-JOINER U+200D 0xe2808d ZERO WIDTH JOINER U+200E 0xe2808e LEFT-TO-RIGHT MARK U+200F 0xe2808f RIGHT-TO-LEFT MARK U+202A 0xe280aa LEFT-TO-RIGHT EMBEDDING U+202B 0xe280ab RIGHT-TO-LEFT EMBEDDING U+202C 0xe280ac POP DIRECTIONAL FORMATTING U+202D 0xe280ad LEFT-TO-RIGHT OVERRIDE U+202E 0xe280ae RIGHT-TO-LEFT OVERRIDE U+206A 0xe281aa INHIBIT SYMMETRIC SWAPPING U+206B 0xe281ab ACTIVATE SYMMETRIC SWAPPING U+206C 0xe281ac INHIBIT ARABIC FORM SHAPING U+206D 0xe281ad ACTIVATE ARABIC FORM SHAPING U+206E 0xe281ae NATIONAL DIGIT SHAPES U+206F 0xe281af NOMINAL DIGIT SHAPES U+FEFF 0xefbbbf ZERO WIDTH NO-BREAK SPACE [1] http://www.unicode.org/versions/Unicode7.0.0/ch05.pdf#G40025 http://www.unicode.org/reports/tr31/#Layout_and_Format_Control_Characters [2] http://dubeiko.com/development/FileSystems/HFSPLUS/tn1150.html#UnicodeSubtleties Change-Id: Ib6a1dd090b2649bdd8ec16387c994ed29de2860d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * ObjectChecker: Disallow Windows shortname "GIT~1"Christian Halstrick2014-12-181-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows creates shortnames for all non-8.3 files (see [1]). Hence we need to disallow all names which could potentially be a shortname for ".git". Example: in an empty directory create a folder "GIT~1". Now you can't create another folder ".git". The path "GIT~1" may map to ".git" on Windows. A potential victim to such an attack first has to initialize a git repository in order to receive any git commits. Hence the .git folder created by init will get the shortname "GIT~1". ".git" will only get a different shortname if the user has created a file "GIT~1" before initialization of the git repository. [1] http://en.wikipedia.org/wiki/8.3_filename Change-Id: I9978ab8f2d2951c46c1b9bbde57986d64d26b9b2 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * ObjectChecker: Disallow ".git." and ".git<space>"Shawn Pearce2014-12-182-8/+98
| | | | | | | | | | | | | | | | | | | | | | | | Windows treats "foo." and "foo " as "foo". The ".git" directory is special, as it contains metadata for a local Git repository. Disallow variations that Windows considers to be the same. Change-Id: I28eb48859a95a89111b4987c91de97557e3bb539
| | * Always ignore case when forbidding .git in ObjectCheckerShawn Pearce2014-12-181-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The component name ".GIT" inside a tree entry could confuse a case insensitive filesystem into looking at a submodule and not a directory entry. Disallow any case permutations of ".git" to prevent this confusion from entering a repository and showing up at a later date on a case insensitive system. Change-Id: Iaa3f768931d0d5764bf07ac5f6f3ff2b1fdda01b
| | * DirCache: Refuse to read files with invalid pathsShawn Pearce2014-12-181-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the DirCache contains a path that is known to be invalid, refuse to read the DirCache into memory. This avoids confusing errors later if an invalid path read from the DirCache were to be passed into a new DirCacheEntry constructor. Change-Id: Ic033d81e23a5fbd554cc4dff80a232504562ffa8
| | * DirCache: Replace isValidPath with DirCacheCheckout.checkValidPathShawn Pearce2014-12-181-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | isValidPath is an older simple form of the validation performed by checkValidPath. Use the latter as it more consistently matches git-core's validation rules. By running the same validation as fsck, callers creating an entry for the DirCache are more likely to learn early they are trying to build trees that will fail fsck. Change-Id: Ibf5ac116097156aa05c18e231bc65c0854932eb1
| | * Replace "a." with "a-" in unit testsShawn Pearce2014-12-188-29/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows does not like naming files "a.". The trailing "." may be dropped by the filesystem, which is confusing. Even though these tests currently do not write to disk, future tests like them might. Replace "." with "-", which has the same sorting properties that were desirable about ".", but does not have the same limitations. Change-Id: Ie5b7594bf5e79828d1341883c73ddb70123d5055
| | * Deprecate TemporaryBuffer.LocalFile without parent directoryShawn Pearce2014-11-252-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Encourage callers to explicitly name a directory to hold any overflow data. Call sites have more information about what is going into the buffer and how it should be protected at the filesystem level than just throwing content to the system wide temporary directory. Callers that still really don't care (or need to care) can pass null for the File argument to have the system directory used. Change-Id: I89009bbee49d3850d42cd82c2c462e51043acda0
| | * DirCache: Buffer TREE extension to $GIT_DIRShawn Pearce2014-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Increase the in-memory buffer for the TREE extension to 5 MiB, and overflow to $GIT_DIR instead of /tmp. Using a larger buffer reduces the chances a repository will overflow and need to spool the extension to disk. Using $GIT_DIR allows the TREE extension contents to have the same file system protections as the final $GIT_DIR/index. Wrap the entire thing in a try/finally to ensure the temp file is deleted from disk after the block has finished using it. To avoid dangling NFS files, LocalFile.destroy() does close the local file before deleting it. Change-Id: I8f871181a4689e3ebf0cdd4fd1769333cf7546c3
| * | Prepare 3.5.3-SNAPSHOT buildsMatthias Sohn2014-11-122-38/+38
| | | | | | | | | | | | | | | Change-Id: Ia37eb66a0deaf6e86a726b1b12eaea25416d4a36 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v3.5.2.201411120430-rv3.5.2.201411120430-rMatthias Sohn2014-11-122-2/+2
| | | | | | | | | | | | | | | Change-Id: I217d25ee712cbde52bc9319ef1dd15d2f571d37a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 3.5.2-SNAPSHOT buildsMatthias Sohn2014-10-142-38/+38
| | | | | | | | | | | | | | | Change-Id: Ib2ccdebe80bad0b09d2d31889a3ab89d77e341f6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v3.5.1.201410131835-rv3.5.1.201410131835-rMatthias Sohn2014-10-142-2/+2
| | | | | | | | | | | | | | | Change-Id: I37e049c8e81f963cfb7c17f1af91fd4245766aee Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Support the new repository layout for submodulesChristian Halstrick2014-12-151-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When updating a submodule (e.g. during recursive clone) the repository for the submodule should be located at <gitdir>/modules/<submodule-path> whereas the working tree of the submodule should be located at <working-tree>/<submodule-path> (<gitdir> and <working-tree> are associated to the containing repository). Since CloneCommand has learned about specifying a separate gitdir this is easy to implement in SubmoduleUpdateCommand. Change-Id: I9b56a3dfa50f97f6975c2bb7c97b36296f331b64
* | | Allow explicit configuration of git directory in CloneCommandChristian Halstrick2014-12-151-0/+50
| | | | | | | | | | | | | | | | | | | | | This feature is needed to support the new submodule layout where the .git folder of the submodules is under .git/modules/<submodule>. Change-Id: If5f13426cfd09b7677e23478e9700c8c25a6dae5
* | | Allow explicit configuration of git directory in InitCommandChristian Halstrick2014-12-151-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Native git's "init" command allows to specify the location of the .git folder with the option "--separate-git-dir". This allows for example to setup repositories with a non-standard layout. E.g. .git folder under /repos/a.git and the worktree under /home/git/a. Both directories contain pointers to the other side: /repos/a.git/config contains core.worktree=/home/git/a . And /home/git/a/.git is a file containing "gitdir: /repos/a.git". This commit adds that option to InitCommand. This feature is needed to support the new submodule layout where the .git folder of the submodules is under .git/modules/<submodule>. Change-Id: I0208f643808bf8f28e2c979d6e33662607775f1f
* | | Fix tests on windows by closing reposChristian Halstrick2014-12-128-238/+247
| | | | | | | | | | | | | | | | | | | | | Without explicitly closing repos we can't delete the test repositories on windows. Change-Id: Id5fa17bd764cbf28703c2f21639d7e969289c2d6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge "Fix DirCacheCheckout to set correct file length if ↵Christian Halstrick2014-12-121-1/+47
|\ \ \ | | | | | | | | | | | | core.autocrlf=true" into stable-3.6
| * | | Fix DirCacheCheckout to set correct file length if core.autocrlf=trueMatthias Sohn2014-12-111-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To update the file length stat we need to use the length of the temporary file since it's not yet renamed to the target file name here. The incorrect file length stat update was introduced in a606dc363d0f6b09e4527cca6b645d3cb1ec407d. Bug: 453962 Change-Id: I715c048227553efae6f8f6b6878c0f04f2609d9c Also-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de> Also-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | CheckoutCommand: Fix checking out ours/theirs when no base stage existsRobin Stocker2014-12-101-0/+34
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | In case of an add/add conflict, no base stage exists. The previous implementation would skip over the entries because the condition expected the base stage to always exist. Change-Id: Ie2b3685d958c09b241991b74e6177401e8a1ebc9 Signed-off-by: Robin Stocker <robin@nibor.org>
* | | Consider parent rules if ignore rule is negatedAndrey Loskutov2014-11-291-2/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change tries to make jgit behave more like native CLI git regarding the negation rules. According to [1] "... prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again." Negating the pattern should not automatically make the file *not ignored* - other pattern rules have to be considered too. The fix adds test cases for both bugs 448094 and 407475. [1] https://www.kernel.org/pub/software/scm/git/docs/gitignore.html Bug: 448094 Bug: 407475 Change-Id: I322954200dd3c683e3d8f4adc48506eb99e56ae1 Signed-off-by: Andrey Loskutov <loskutov@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Deprecate checkoutEntry variant that accepts FileShawn Pearce2014-11-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Entries should only be written to the working tree managed by the Repository. Simplify callers by passing only the entry and computing the work tree location inside of the checkoutEntry method. Change-Id: I574e41280d0407f1853fda12f4bd0d30f75d74e7
* | | Deprecate checkoutEntry without ObjectReaderShawn Pearce2014-11-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Callers should manage the ObjectReader, as this allows the JGit library to cache context relevant information across files checked out at the same time. If the caller only has one file to checkout, it should still explicitly manage the life span of the ObjectReader. Change-Id: Ib57fba6cb4b774ccff8c416ef4d32e2b390f16a9
* | | Don't use java.util.regex for two simple wildcard casesAndrey Loskutov2014-11-183-21/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To improve ignore parser performance we can avoid using java.util.regex code on simple wildcard patterns with leading or trailing asterisk. As those patterns represent a majority of ignore rules, the index diff performance can be drastically increased on huge repository with lot of ignore rules. Bug: 450466 Change-Id: I80428441cc8d5de5468813f841d89322413eed8b Signed-off-by: Andrey Loskutov <loskutov@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Fix variable name and error message for sideband testingStefan Beller2014-11-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Actually the test only allows a range from [1,255], so let's name the variable so. Change-Id: Iecdb8149b83389c67e3cd2f64f4a654c175475be Signed-off-by: Stefan Beller <sbeller@google.com>
* | | Expand wildcard imports to specfic classesShawn Pearce2014-11-107-27/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | JGit style is to import exactly the classes required, and never to use "import foo.*" as the foo package could add new classes in the future which are conflicting/confusing with the imports already used by a source file. Change-Id: I5693408c777e5843ec65fff1163d5d717849fa34