summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'stable-3.7'Matthias Sohn2015-02-0414-8/+859
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.7: Add option --orphan for checkout Prepare post 3.7.0.201502031740-rc1 builds JGit v3.7.0.201502031740-rc1 Support for the pre-commit hook Fix FileUtils.testRelativize_mixedCase which failed on Mac OS X Add a hook test Introduce hook support into the FS implementations If a pack isn't found on disk remove it from pack list Conflicts: org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF Change-Id: I936acd24d47b911fa30ab29856094e1b2c6ac3db Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare post 3.7.0.201502031740-rc1 buildsMatthias Sohn2015-02-043-4/+4
| | | | | | | | Change-Id: Id3728e771a4441757de016cc9d68055f668126b0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v3.7.0.201502031740-rc1v3.7.0.201502031740-rc1Matthias Sohn2015-02-033-4/+4
| | | | | | | | | | Change-Id: Ia2ea65945b7e1d4120da3d6e6c9f6d5fdb642ae6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Support for the pre-commit hookLaurent Goubet2015-02-026-8/+138
| | | | | | | | | | | | | | | | | | Introduce support for the pre-commit hook into JGit, along with the --no-verify commit command option to bypass it when rebasing / cherry-picking. Change-Id: If86df98577fa56c5c03d783579c895a38bee9d18 Signed-off-by: Laurent Goubet <laurent.goubet@obeo.fr> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Introduce hook support into the FS implementationsLaurent Goubet2015-02-029-0/+716
| | | | | | | | | | | | | | | | | | | | | | 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>
| * If a pack isn't found on disk remove it from pack listMatthias Sohn2015-01-273-0/+5
| | | | | | | | | | | | | | | | | | If accessing a pack throws FileNotFoundException the pack was deleted and we need to remove it from the pack list. This can be caused e.g. by git gc. Change-Id: I5d10f87f364dadbbdbfb61b6b2cbdee9c7457f3d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Add BatchRefUpdate#toString()Dave Borowitz2015-01-271-0/+16
| | | | | | | | Change-Id: I58c342a91911763055c1073d2f426340fbf94fa4
* | Prepare 4.0.0-SNAPSHOT buildsMatthias Sohn2015-01-273-39/+39
|/ | | | | Change-Id: I414ba8ccc82866d3107ba7083a567ea70c879bdf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge "Fix integer overflow in DiffFormatter when context is set to large int"Shawn Pearce2015-01-271-4/+4
|\
| * Fix integer overflow in DiffFormatter when context is set to large intIlmars Poikans2014-12-011-4/+4
| | | | | | | | | | | | | | | | | | | | In original code, if you call the DiffFormatter's setContext() method with Integer.MAX_VALUE (to get full-context diffs) the format() method will get into an infinite loop. Bug: 382680 Change-Id: I804e82cde9b84b8ff232a20fb5cbde04478315e7 Signed-off-by: Ilmars Poikans <ilmars@delibero.lv>
* | Merge "Handle invalid tree extensions"Shawn Pearce2015-01-271-1/+1
|\ \
| * | Handle invalid tree extensionsChristian Halstrick2015-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case the index contains wrong tree extensions don't throw a ArrayIndexOutOfBounds exception but revalidate the tree extension. It happened that the git index written by Git for Windows contained valid (means entryCount>0) tree extensions for pathes which are not existing in the index. Native git handles this inconsistency silently but JGit was crashing with a ArrayIndexOutOfBounds exception. Teach JGit to better recognize such cases and revalidate such extensions. It's hard to write a test because JGit doesn't write such extensions. It only reads, validates and makes use of them. But the bug tells how to create such situations. Bug: 457152 Change-Id: Id3ffd7dc7ae1c55674d88bf1b43953234fe0b68d
* | | InMemoryRepository: Ensure new ref targets exist in the repoDave Borowitz2015-01-261-0/+13
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ObjectInserter recently learned to read back inserted objects before they have been flushed. It is in general unsafe to create refs to such objects, but it is now much more possible to do so, by passing "new RevWalk(inserter.newReader())" into RefUpdate#execute(RevWalk). We can't change the RefUpdate interface to remove execute(RevWalk); nor would we necessarily want to, for performance reasons. And in any case, RefUpdate#safeParse explicitly ignores MissingObjectExceptions. But we can enforce object existence in InMemoryRepository, which will allow callers using this class in their tests to ensure they are using the RefDatabase correctly. Change-Id: I5c696ba23bcd2a536a0512fa7f5b6130961905c5
* | Merge "Ensure GitCommand's "callable" guard is thread-safe"Christian Halstrick2015-01-231-3/+4
|\ \
| * | Ensure GitCommand's "callable" guard is thread-safeMatthias Sohn2015-01-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | This way we can ensure that the same command instance can't be used concurrently in multiple threads. Bug: 458023 Change-Id: I4884a1ef2f609f9fb24dda4bd5819dffb9f174b6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge changes I05be0a5b,Ieee334f4Christian Halstrick2015-01-232-0/+17
|\ \ \ | | | | | | | | | | | | | | | | | | | | * changes: Document that repo returned by SubmoduleAddCommand needs to be closed Document that Git instance returned by CloneCommand needs to be closed
| * | | Document that repo returned by SubmoduleAddCommand needs to be closedMatthias Sohn2015-01-221-0/+11
| | | | | | | | | | | | | | | | | | | | Bug: 448570 Change-Id: I05be0a5b07f8e22f55637b9a3080362978368bcb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | Document that Git instance returned by CloneCommand needs to be closedMatthias Sohn2015-01-221-0/+6
| |/ / | | | | | | | | | | | | Bug: 448570 Change-Id: Ieee334f4d82cd71ba98b26abb8667e8f64cac665 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* / / Silence non-externalized string warnings in RepoCommandMatthias Sohn2015-01-221-4/+4
|/ / | | | | | | Change-Id: Ia25543c0d80817f8eb35c667ba5dcce046131a7c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge remote-tracking branch 'origin/stable-3.6'Matthias Sohn2015-01-213-10/+34
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/stable-3.6: Prepare 3.6.3-SNAPSHOT builds JGit v3.6.2.201501210735-r Don't remove pack from pack list for problems which could be transient Log reason for ignoring pack when IOException occurred Change-Id: I61141b52839511d58e5a5b193bfde31e9f444a6c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 3.6.3-SNAPSHOT buildsstable-3.6Matthias Sohn2015-01-213-38/+38
| | | | | | | | | | | | | | | Change-Id: Ie753dc77a23558d1993e959f48b7eb06557ea686 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v3.6.2.201501210735-rv3.6.2.201501210735-rMatthias Sohn2015-01-213-4/+4
| | | | | | | | | | | | | | | Change-Id: I483fc7bbff1561721cf621dc67ce4a193624fa64 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Don't remove pack from pack list for problems which could be transientMatthias Sohn2015-01-213-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we hit a corrupt object or invalid pack remove the pack from the pack list. Other IOException could be transient hence we should not remove the pack from the list to avoid the problem reported on the Gerrit list [1]. It looks like in the reported case the pack was removed from the pack list causing MissingObjectExceptions which disappear when the server is restarted. [1] https://groups.google.com/forum/#!topic/repo-discuss/Qdmbl-YZ4NU Change-Id: I331626110d54b190e46cddc2c40f29ddeb9613cd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Log reason for ignoring pack when IOException occurredMatthias Sohn2015-01-153-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should help to identify the root cause of the problem discussed on the Gerrit list [1]. [1] https://groups.google.com/forum/#!topic/repo-discuss/Qdmbl-YZ4NU Change-Id: I871f70e4bb1227952e1544b789013583b14e2b96 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Fix RawText.getLineDelimiter() for empty first lineFrank Wagner2015-01-171-1/+1
| | | | | | | | | | | | | | | | | | Bug: 456776 Change-Id: Iae50be89ea6d5aee33bd938a937ac5ca578aabca Signed-off-by: Frank Wagner <frank.wagner@fr.ibm.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Silence API warning raised since 7fafd372Matthias Sohn2015-01-131-0/+9
| | | | | | | | | | | | | | | | | | | | | This new git capability isn't yet in the wild in the git-core camp. Hence we can silence this API warning. Change-Id: I9e030959f658c58344b04ef2f9edd28060f0c964 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Update atomic constantStefan Beller2015-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The atomic feature is now cooking in -next in git-core. Very rarely features are ejected from the the next branch in git-core, so I consider it reasonable to come up with this patch now to make the 2 implementations interoperable. Change-Id: I806a8ae3c045ca5936f69cb903baf9b99ee39181 Signed-off-by: Stefan Beller <sbeller@google.com>
* | | Add basic support for .gitattributesArthur Daussy2015-01-0712-23/+840
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+2
| | | | | | | | | | | | | | | Bug: 456792 Change-Id: Idf38a0db7dc72d672ff185dcac2f41f0012a6673 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
* | | Merge branch 'stable-3.6'Matthias Sohn2015-01-043-25/+46
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-043-38/+38
| | | | | | | | | | | | | | | Change-Id: I9699d84af2d4b5382d8ee88ed3517d6b91305421 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v3.6.1.201501031845-rv3.6.1.201501031845-rMatthias Sohn2015-01-043-4/+4
| | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-22/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-243-38/+38
| | | | | | | | | | | | | | | Change-Id: Ib3e7b5f46ee1e27b9cf25b3b2d01d681a5c4904c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge branch 'stable-3.6'Matthias Sohn2014-12-244-43/+51
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.6: Prepare 3.6.1-SNAPSHOT builds JGit v3.6.0.201412230720-r [pgm] Add option --bare to clone command [pgm] Implement clone using CloneCommand Fix junit tests under windows when the platform is explicitly changed Fix unit tests for windows by explicitly closing test repos [pgm] Add option --tags for ls-remote [pgm] Add option --heads for ls-remote [pgm] Use LsRemoteCommand to implement ls-remote and add a test Change-Id: I8f31e76cb7e9416919f37e02c7e51ab1d221df40 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 3.6.1-SNAPSHOT buildsMatthias Sohn2014-12-233-38/+38
| | | | | | | | | | | | | | | Change-Id: Ie620c90ffafbffc6755b4e1ed55a61a15b118a2a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v3.6.0.201412230720-rv3.6.0.201412230720-rMatthias Sohn2014-12-233-4/+4
| | | | | | | | | | | | | | | Change-Id: Ic28e2bbbdb1099e948c64a005c39f6b8d8ac69a8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Fix junit tests under windows when the platform is explicitly changedChristian Halstrick2014-12-221-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SystemReader used a chached ObjectChecker which was instantiated only once. But in case of unit tests where we can change the platform dynamically (e.g. MockSystemReader.setWindows()) this is wrong and caused DirCacheCheckoutMaliciousPathTest. testMaliciousAbsoluteCurDrivePathWindowsOnUnix() to fail. This change allows user of SystemReader to force the creation of a new ObjectChecker. MockSystemReader.setWindows() and .setUnix() make use of this feature. Change-Id: I87458d1dc63c1f5c18979f972b1c1f0d670a9ed8
* | | Merge branch 'stable-3.6'Shawn Pearce2014-12-1922-131/+434
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.6: (26 commits) 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 Support the new repository layout for submodules Allow explicit configuration of git directory in CloneCommand Allow explicit configuration of git directory in InitCommand Fix tests on windows by closing repos RepoCommand should close opened repos Fix LocalDiskRepositoryTestCase to create correct type of repos Prevent NPE if ref can't be resolved when executing ReflogCommand Fix DirCacheCheckout to set correct file length if core.autocrlf=true CheckoutCommand: Fix checking out ours/theirs when no base stage exists Make sure modifications to config-param trustFolderStat are detected Apache HttpClientConnection: replace calls to deprecated LocalFile() ... Change-Id: Ife6f21d64a148dbb0d0d9055356b1568188806fe
| * | Merge branch 'stable-3.5' into stable-3.6Matthias Sohn2014-12-1910-79/+192
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-183-4/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: Iadbd460da494c04fba71f98c200d6b65ce1709c6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | Merge branch 'stable-3.4' into stable-3.5Matthias Sohn2014-12-1810-79/+192
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-183-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 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/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-181-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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