]> source.dussan.org Git - jgit.git/commit
Move checkPath from DirCacheCheckout to ObjectChecker 14/37314/1
authorShawn Pearce <spearce@spearce.org>
Tue, 25 Nov 2014 05:43:59 +0000 (21:43 -0800)
committerShawn Pearce <spearce@spearce.org>
Sat, 29 Nov 2014 04:59:34 +0000 (20:59 -0800)
commitb6b843e51996141d3329353bc9799f1e761199e1
tree11be984fdaa154ba31c729e13c41af14db9168d0
parent1a721437808cbf7ae0bcdd1b2e060a69aaf2a16b
Move checkPath from DirCacheCheckout to ObjectChecker

The bulk of the "is this sane" logic is inside of ObjectChecker.  The
only caller for the version in DirCacheCheckout is an obtuse usage for
the static isValidRefName() method in Repository.

Deprecate the weird single use method in DirCacheCheckout and move all
code for checking a sequence of path components into ObjectChecker,
where it makes sense alongside the existing code that checks a single
component at a time.

Reuse a single ObjectChecker for the local platform, to avoid looking
up the system properties on each path string considered.

Change-Id: Iae6e769f2bfcad05c166e70ff255f9cf9fcdc87e
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectChecker.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java