Move FileRepository to storage.file.FileRepository
This move isolates all of the local file specific implementation code into a single package, where their package-private methods and support classes are properly hidden away from the rest of the core library. Because of the sheer number of files impacted, I have limited this change to only the renames and the updated imports. Change-Id: Icca4884e1a418f83f8b617d0c4c78b73d8a4bd17 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
3a7aec03e0
commit
ad5238dc67
|
@ -17,6 +17,7 @@ Import-Package: javax.servlet;version="[2.5.0,3.0.0)",
|
|||
org.eclipse.jgit.lib;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.nls;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.revwalk;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.storage.file;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.transport;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.util;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.util.io;version="[0.9.0,0.10.0)"
|
||||
|
|
|
@ -53,8 +53,8 @@
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.eclipse.jgit.lib.ObjectDatabase;
|
||||
import org.eclipse.jgit.lib.ObjectDirectory;
|
||||
import org.eclipse.jgit.lib.PackFile;
|
||||
import org.eclipse.jgit.storage.file.ObjectDirectory;
|
||||
import org.eclipse.jgit.storage.file.PackFile;
|
||||
|
||||
/** Sends the current list of pack files, sorted most recent first. */
|
||||
class InfoPacksServlet extends HttpServlet {
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.eclipse.jgit.lib.ObjectDirectory;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.storage.file.ObjectDirectory;
|
||||
|
||||
/**
|
||||
* Requires the target {@link Repository} to be available via local filesystem.
|
||||
|
|
|
@ -60,8 +60,8 @@
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.eclipse.jgit.lib.ObjectDirectory;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.storage.file.ObjectDirectory;
|
||||
|
||||
/** Sends any object from {@code GIT_DIR/objects/??/0 38}, or any pack file. */
|
||||
abstract class ObjectFileServlet extends HttpServlet {
|
||||
|
|
|
@ -29,5 +29,6 @@ Import-Package: javax.servlet;version="[2.5.0,3.0.0)",
|
|||
org.eclipse.jgit.junit;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.lib;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.revwalk;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.storage.file;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.transport;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.util;version="[0.9.0,0.10.0)"
|
||||
|
|
|
@ -59,13 +59,13 @@
|
|||
import org.eclipse.jgit.http.test.util.HttpTestCase;
|
||||
import org.eclipse.jgit.junit.TestRepository;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.FileBasedConfig;
|
||||
import org.eclipse.jgit.lib.FileRepository;
|
||||
import org.eclipse.jgit.lib.NullProgressMonitor;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.revwalk.RevBlob;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.storage.file.FileBasedConfig;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
import org.eclipse.jgit.transport.ReceivePack;
|
||||
import org.eclipse.jgit.transport.RemoteRefUpdate;
|
||||
import org.eclipse.jgit.transport.Transport;
|
||||
|
|
|
@ -61,13 +61,13 @@
|
|||
import org.eclipse.jgit.http.test.util.HttpTestCase;
|
||||
import org.eclipse.jgit.junit.TestRepository;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.FileBasedConfig;
|
||||
import org.eclipse.jgit.lib.FileRepository;
|
||||
import org.eclipse.jgit.lib.NullProgressMonitor;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.revwalk.RevBlob;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.storage.file.FileBasedConfig;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
import org.eclipse.jgit.transport.PreReceiveHook;
|
||||
import org.eclipse.jgit.transport.PushResult;
|
||||
import org.eclipse.jgit.transport.ReceiveCommand;
|
||||
|
|
|
@ -62,11 +62,11 @@
|
|||
import org.eclipse.jgit.http.test.util.HttpTestCase;
|
||||
import org.eclipse.jgit.junit.TestRepository;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.FileRepository;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.RefUpdate;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
import org.eclipse.jgit.transport.FetchConnection;
|
||||
import org.eclipse.jgit.transport.Transport;
|
||||
import org.eclipse.jgit.transport.URIish;
|
||||
|
|
|
@ -76,15 +76,15 @@
|
|||
import org.eclipse.jgit.junit.TestRepository;
|
||||
import org.eclipse.jgit.junit.TestRng;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.FileBasedConfig;
|
||||
import org.eclipse.jgit.lib.FileRepository;
|
||||
import org.eclipse.jgit.lib.NullProgressMonitor;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.ReflogReader;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.revwalk.RevBlob;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.storage.file.FileBasedConfig;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
import org.eclipse.jgit.storage.file.ReflogReader;
|
||||
import org.eclipse.jgit.transport.FetchConnection;
|
||||
import org.eclipse.jgit.transport.HttpTransport;
|
||||
import org.eclipse.jgit.transport.RemoteRefUpdate;
|
||||
|
|
|
@ -57,11 +57,11 @@
|
|||
import org.eclipse.jgit.junit.TestRepository;
|
||||
import org.eclipse.jgit.lib.AnyObjectId;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.FileRepository;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.revwalk.RevObject;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
import org.eclipse.jgit.transport.RefSpec;
|
||||
import org.eclipse.jgit.transport.RemoteRefUpdate;
|
||||
import org.eclipse.jgit.transport.URIish;
|
||||
|
|
|
@ -15,6 +15,7 @@ Import-Package: org.eclipse.jgit.diff;version="[0.9.0,0.10.0)",
|
|||
org.eclipse.jgit.revplot;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.revwalk;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.revwalk.filter;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.storage.file;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.transport;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.treewalk;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.treewalk.filter;version="[0.9.0,0.10.0)",
|
||||
|
|
|
@ -58,9 +58,9 @@
|
|||
import org.eclipse.jgit.errors.ConfigInvalidException;
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.FileBasedConfig;
|
||||
import org.eclipse.jgit.lib.LockFile;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.storage.file.FileBasedConfig;
|
||||
import org.eclipse.jgit.storage.file.LockFile;
|
||||
|
||||
/**
|
||||
* Manages the {@code .eclipse_iplog} file in a project.
|
||||
|
|
|
@ -18,6 +18,7 @@ Import-Package: junit.framework;version="[3.8.2,4.0.0)",
|
|||
org.eclipse.jgit.revplot;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.revwalk;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.revwalk.filter;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.storage.file;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.transport;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.treewalk;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.treewalk.filter;version="[0.9.0,0.10.0)",
|
||||
|
|
|
@ -62,13 +62,13 @@
|
|||
|
||||
import org.eclipse.jgit.lib.AnyObjectId;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.FileBasedConfig;
|
||||
import org.eclipse.jgit.lib.FileRepository;
|
||||
import org.eclipse.jgit.lib.PersonIdent;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.lib.RepositoryCache;
|
||||
import org.eclipse.jgit.lib.WindowCache;
|
||||
import org.eclipse.jgit.lib.WindowCacheConfig;
|
||||
import org.eclipse.jgit.storage.file.FileBasedConfig;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
import org.eclipse.jgit.storage.file.WindowCache;
|
||||
import org.eclipse.jgit.storage.file.WindowCacheConfig;
|
||||
import org.eclipse.jgit.util.IO;
|
||||
import org.eclipse.jgit.util.SystemReader;
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
import org.eclipse.jgit.errors.ConfigInvalidException;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.FileBasedConfig;
|
||||
import org.eclipse.jgit.storage.file.FileBasedConfig;
|
||||
import org.eclipse.jgit.util.FS;
|
||||
import org.eclipse.jgit.util.SystemReader;
|
||||
|
||||
|
|
|
@ -73,14 +73,10 @@
|
|||
import org.eclipse.jgit.lib.Commit;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.FileMode;
|
||||
import org.eclipse.jgit.lib.FileRepository;
|
||||
import org.eclipse.jgit.lib.LockFile;
|
||||
import org.eclipse.jgit.lib.NullProgressMonitor;
|
||||
import org.eclipse.jgit.lib.ObjectChecker;
|
||||
import org.eclipse.jgit.lib.ObjectDirectory;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectInserter;
|
||||
import org.eclipse.jgit.lib.PackFile;
|
||||
import org.eclipse.jgit.lib.PackWriter;
|
||||
import org.eclipse.jgit.lib.PersonIdent;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
|
@ -88,7 +84,6 @@
|
|||
import org.eclipse.jgit.lib.RefWriter;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.lib.Tag;
|
||||
import org.eclipse.jgit.lib.PackIndex.MutableEntry;
|
||||
import org.eclipse.jgit.revwalk.ObjectWalk;
|
||||
import org.eclipse.jgit.revwalk.RevBlob;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
|
@ -96,6 +91,11 @@
|
|||
import org.eclipse.jgit.revwalk.RevTag;
|
||||
import org.eclipse.jgit.revwalk.RevTree;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
import org.eclipse.jgit.storage.file.LockFile;
|
||||
import org.eclipse.jgit.storage.file.ObjectDirectory;
|
||||
import org.eclipse.jgit.storage.file.PackFile;
|
||||
import org.eclipse.jgit.storage.file.PackIndex.MutableEntry;
|
||||
import org.eclipse.jgit.treewalk.TreeWalk;
|
||||
import org.eclipse.jgit.treewalk.filter.PathFilterGroup;
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ Import-Package: org.eclipse.jgit.api;version="[0.9.0,0.10.0)",
|
|||
org.eclipse.jgit.revplot;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.revwalk;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.revwalk.filter;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.storage.file;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.transport;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.treewalk;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.treewalk.filter;version="[0.9.0,0.10.0)",
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
import org.eclipse.jgit.errors.TransportException;
|
||||
import org.eclipse.jgit.lib.Commit;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.FileRepository;
|
||||
import org.eclipse.jgit.lib.GitIndex;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.RefComparator;
|
||||
|
@ -65,6 +64,7 @@
|
|||
import org.eclipse.jgit.lib.TextProgressMonitor;
|
||||
import org.eclipse.jgit.lib.Tree;
|
||||
import org.eclipse.jgit.lib.WorkDirCheckout;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
import org.eclipse.jgit.transport.FetchResult;
|
||||
import org.eclipse.jgit.transport.RefSpec;
|
||||
import org.eclipse.jgit.transport.RemoteConfig;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
import org.kohsuke.args4j.Option;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.FileRepository;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
|
||||
@Command(common = true, usage = "usage_CreateAnEmptyGitRepository")
|
||||
class Init extends TextBuiltin {
|
||||
|
|
|
@ -62,7 +62,6 @@
|
|||
import org.eclipse.jgit.errors.ObjectWritingException;
|
||||
import org.eclipse.jgit.lib.Commit;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.LockFile;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectIdRef;
|
||||
import org.eclipse.jgit.lib.ObjectWriter;
|
||||
|
@ -76,6 +75,7 @@
|
|||
import org.eclipse.jgit.pgm.CLIText;
|
||||
import org.eclipse.jgit.pgm.TextBuiltin;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.storage.file.LockFile;
|
||||
|
||||
/**
|
||||
* Recreates a repository from another one's commit graph.
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
import org.eclipse.jgit.iplog.IpLogGenerator;
|
||||
import org.eclipse.jgit.iplog.SimpleCookieManager;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.LockFile;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.pgm.CLIText;
|
||||
import org.eclipse.jgit.pgm.Command;
|
||||
|
@ -59,6 +58,7 @@
|
|||
import org.eclipse.jgit.revwalk.RevObject;
|
||||
import org.eclipse.jgit.revwalk.RevTag;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.storage.file.LockFile;
|
||||
import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ Import-Package: junit.framework;version="[3.8.2,4.0.0)",
|
|||
org.eclipse.jgit.revplot;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.revwalk;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.revwalk.filter;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.storage.file;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.transport;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.treewalk;version="[0.9.0,0.10.0)",
|
||||
org.eclipse.jgit.treewalk.filter;version="[0.9.0,0.10.0)",
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
import java.io.Reader;
|
||||
|
||||
import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
|
||||
/**
|
||||
* Base class for most JGit unit tests.
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
|
@ -53,6 +53,15 @@
|
|||
|
||||
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
|
||||
import org.eclipse.jgit.errors.MissingObjectException;
|
||||
import org.eclipse.jgit.lib.AnyObjectId;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.NullProgressMonitor;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectLoader;
|
||||
import org.eclipse.jgit.lib.ObjectWriter;
|
||||
import org.eclipse.jgit.lib.PackWriter;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.lib.RepositoryTestCase;
|
||||
import org.eclipse.jgit.revwalk.RevObject;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
|
|
@ -41,14 +41,15 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
import org.eclipse.jgit.errors.MissingObjectException;
|
||||
import org.eclipse.jgit.lib.PackIndex.MutableEntry;
|
||||
import org.eclipse.jgit.lib.RepositoryTestCase;
|
||||
import org.eclipse.jgit.storage.file.PackIndex.MutableEntry;
|
||||
|
||||
public abstract class PackIndexTestCase extends RepositoryTestCase {
|
||||
|
|
@ -43,11 +43,12 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.eclipse.jgit.errors.MissingObjectException;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.util.JGitTestUtil;
|
||||
|
||||
public class PackIndexV1Test extends PackIndexTestCase {
|
|
@ -43,11 +43,12 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.eclipse.jgit.errors.MissingObjectException;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.util.JGitTestUtil;
|
||||
|
||||
public class PackIndexV2Test extends PackIndexTestCase {
|
|
@ -42,10 +42,11 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import org.eclipse.jgit.errors.CorruptObjectException;
|
||||
import org.eclipse.jgit.lib.PackIndex.MutableEntry;
|
||||
import org.eclipse.jgit.lib.RepositoryTestCase;
|
||||
import org.eclipse.jgit.storage.file.PackIndex.MutableEntry;
|
||||
import org.eclipse.jgit.util.JGitTestUtil;
|
||||
|
||||
public class PackReverseIndexTest extends RepositoryTestCase {
|
|
@ -41,7 +41,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
@ -59,9 +59,13 @@
|
|||
import java.util.List;
|
||||
|
||||
import org.eclipse.jgit.errors.MissingObjectException;
|
||||
import org.eclipse.jgit.lib.PackIndex.MutableEntry;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.PackWriter;
|
||||
import org.eclipse.jgit.lib.SampleDataRepositoryTestCase;
|
||||
import org.eclipse.jgit.lib.TextProgressMonitor;
|
||||
import org.eclipse.jgit.revwalk.RevObject;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.storage.file.PackIndex.MutableEntry;
|
||||
import org.eclipse.jgit.transport.IndexPack;
|
||||
import org.eclipse.jgit.util.JGitTestUtil;
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import static org.eclipse.jgit.lib.Constants.HEAD;
|
||||
import static org.eclipse.jgit.lib.Constants.R_HEADS;
|
||||
|
@ -55,6 +55,10 @@
|
|||
|
||||
import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase;
|
||||
import org.eclipse.jgit.junit.TestRepository;
|
||||
import org.eclipse.jgit.lib.AnyObjectId;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.RefDatabase;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.revwalk.RevTag;
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -51,9 +51,22 @@
|
|||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.PersonIdent;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.RefRename;
|
||||
import org.eclipse.jgit.lib.RefUpdate;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.lib.SampleDataRepositoryTestCase;
|
||||
import org.eclipse.jgit.lib.RefUpdate.Result;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
import org.eclipse.jgit.storage.file.LockFile;
|
||||
import org.eclipse.jgit.storage.file.RefDirectory;
|
||||
import org.eclipse.jgit.storage.file.RefDirectoryUpdate;
|
||||
import org.eclipse.jgit.storage.file.ReflogReader;
|
||||
|
||||
public class RefUpdateTest extends SampleDataRepositoryTestCase {
|
||||
|
||||
|
@ -103,14 +116,14 @@ public void testNoCacheObjectIdSubclass() throws IOException {
|
|||
assertNotSame(newid, r.getObjectId());
|
||||
assertSame(ObjectId.class, r.getObjectId().getClass());
|
||||
assertEquals(newid.copy(), r.getObjectId());
|
||||
List<org.eclipse.jgit.lib.ReflogReader.Entry> reverseEntries1 = db.getReflogReader("refs/heads/abc").getReverseEntries();
|
||||
org.eclipse.jgit.lib.ReflogReader.Entry entry1 = reverseEntries1.get(0);
|
||||
List<org.eclipse.jgit.storage.file.ReflogReader.Entry> reverseEntries1 = db.getReflogReader("refs/heads/abc").getReverseEntries();
|
||||
org.eclipse.jgit.storage.file.ReflogReader.Entry entry1 = reverseEntries1.get(0);
|
||||
assertEquals(1, reverseEntries1.size());
|
||||
assertEquals(ObjectId.zeroId(), entry1.getOldId());
|
||||
assertEquals(r.getObjectId(), entry1.getNewId());
|
||||
assertEquals(new PersonIdent(db).toString(), entry1.getWho().toString());
|
||||
assertEquals("", entry1.getComment());
|
||||
List<org.eclipse.jgit.lib.ReflogReader.Entry> reverseEntries2 = db.getReflogReader("HEAD").getReverseEntries();
|
||||
List<org.eclipse.jgit.storage.file.ReflogReader.Entry> reverseEntries2 = db.getReflogReader("HEAD").getReverseEntries();
|
||||
assertEquals(0, reverseEntries2.size());
|
||||
}
|
||||
|
||||
|
@ -326,7 +339,7 @@ public void testUpdateRefDetached() throws Exception {
|
|||
// the branch HEAD referred to is left untouched
|
||||
assertEquals(pid, db.resolve("refs/heads/master"));
|
||||
ReflogReader reflogReader = new ReflogReader(db, "HEAD");
|
||||
org.eclipse.jgit.lib.ReflogReader.Entry e = reflogReader.getReverseEntries().get(0);
|
||||
org.eclipse.jgit.storage.file.ReflogReader.Entry e = reflogReader.getReverseEntries().get(0);
|
||||
assertEquals(pid, e.getOldId());
|
||||
assertEquals(ppid, e.getNewId());
|
||||
assertEquals("GIT_COMMITTER_EMAIL", e.getWho().getEmailAddress());
|
||||
|
@ -355,7 +368,7 @@ public void testUpdateRefDetachedUnbornHead() throws Exception {
|
|||
// the branch HEAD referred to is left untouched
|
||||
assertNull(db.resolve("refs/heads/unborn"));
|
||||
ReflogReader reflogReader = new ReflogReader(db, "HEAD");
|
||||
org.eclipse.jgit.lib.ReflogReader.Entry e = reflogReader.getReverseEntries().get(0);
|
||||
org.eclipse.jgit.storage.file.ReflogReader.Entry e = reflogReader.getReverseEntries().get(0);
|
||||
assertEquals(ObjectId.zeroId(), e.getOldId());
|
||||
assertEquals(ppid, e.getNewId());
|
||||
assertEquals("GIT_COMMITTER_EMAIL", e.getWho().getEmailAddress());
|
||||
|
@ -677,9 +690,9 @@ public void tryRenameWhenLocked(String toLock, String fromName,
|
|||
ObjectId oldHeadId = db.resolve(Constants.HEAD);
|
||||
writeReflog(db, oldfromId, oldfromId, "Just a message",
|
||||
fromName);
|
||||
List<org.eclipse.jgit.lib.ReflogReader.Entry> oldFromLog = db
|
||||
List<org.eclipse.jgit.storage.file.ReflogReader.Entry> oldFromLog = db
|
||||
.getReflogReader(fromName).getReverseEntries();
|
||||
List<org.eclipse.jgit.lib.ReflogReader.Entry> oldHeadLog = oldHeadId != null ? db
|
||||
List<org.eclipse.jgit.storage.file.ReflogReader.Entry> oldHeadLog = oldHeadId != null ? db
|
||||
.getReflogReader(Constants.HEAD).getReverseEntries() : null;
|
||||
|
||||
assertTrue("internal check, we have a log", new File(db.getDirectory(),
|
|
@ -42,7 +42,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
|
@ -51,7 +51,10 @@
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jgit.lib.ReflogReader.Entry;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.PersonIdent;
|
||||
import org.eclipse.jgit.lib.SampleDataRepositoryTestCase;
|
||||
import org.eclipse.jgit.storage.file.ReflogReader.Entry;
|
||||
|
||||
public class ReflogReaderTest extends SampleDataRepositoryTestCase {
|
||||
|
|
@ -42,13 +42,16 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jgit.errors.ConfigInvalidException;
|
||||
import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase;
|
||||
import org.eclipse.jgit.lib.ConfigConstants;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
|
||||
/**
|
||||
* Tests for setting up the working directory when creating a Repository
|
|
@ -43,7 +43,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
|
@ -54,6 +54,21 @@
|
|||
import java.io.PrintWriter;
|
||||
|
||||
import org.eclipse.jgit.errors.ConfigInvalidException;
|
||||
import org.eclipse.jgit.lib.Commit;
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.FileTreeEntry;
|
||||
import org.eclipse.jgit.lib.ObjectDatabase;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectWriter;
|
||||
import org.eclipse.jgit.lib.PersonIdent;
|
||||
import org.eclipse.jgit.lib.RefUpdate;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.lib.SampleDataRepositoryTestCase;
|
||||
import org.eclipse.jgit.lib.Tag;
|
||||
import org.eclipse.jgit.lib.Tree;
|
||||
import org.eclipse.jgit.lib.TreeEntry;
|
||||
import org.eclipse.jgit.lib.WriteTree;
|
||||
|
||||
public class T0003_Basic extends SampleDataRepositoryTestCase {
|
||||
public void test001_Initalize() {
|
|
@ -44,11 +44,15 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectLoader;
|
||||
import org.eclipse.jgit.lib.SampleDataRepositoryTestCase;
|
||||
import org.eclipse.jgit.util.JGitTestUtil;
|
||||
|
||||
public class T0004_PackReader extends SampleDataRepositoryTestCase {
|
|
@ -41,7 +41,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileInputStream;
|
||||
|
@ -51,6 +51,10 @@
|
|||
import java.util.List;
|
||||
|
||||
import org.eclipse.jgit.errors.CorruptObjectException;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectLoader;
|
||||
import org.eclipse.jgit.lib.SampleDataRepositoryTestCase;
|
||||
import org.eclipse.jgit.util.JGitTestUtil;
|
||||
import org.eclipse.jgit.util.MutableInteger;
|
||||
|
|
@ -41,7 +41,9 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import org.eclipse.jgit.lib.RepositoryTestCase;
|
||||
|
||||
public class WindowCacheReconfigureTest extends RepositoryTestCase {
|
||||
public void testConfigureCache_PackedGitLimit_0() {
|
|
@ -41,7 +41,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.EOFException;
|
|
@ -58,10 +58,10 @@
|
|||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.NullProgressMonitor;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.PackFile;
|
||||
import org.eclipse.jgit.lib.RepositoryTestCase;
|
||||
import org.eclipse.jgit.lib.TextProgressMonitor;
|
||||
import org.eclipse.jgit.revwalk.RevBlob;
|
||||
import org.eclipse.jgit.storage.file.PackFile;
|
||||
import org.eclipse.jgit.util.JGitTestUtil;
|
||||
import org.eclipse.jgit.util.NB;
|
||||
import org.eclipse.jgit.util.TemporaryBuffer;
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
import org.eclipse.jgit.junit.TestRepository;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.NullProgressMonitor;
|
||||
import org.eclipse.jgit.lib.ObjectDirectory;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectLoader;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
|
@ -64,6 +63,7 @@
|
|||
import org.eclipse.jgit.revwalk.RevBlob;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.revwalk.RevTree;
|
||||
import org.eclipse.jgit.storage.file.ObjectDirectory;
|
||||
import org.eclipse.jgit.util.NB;
|
||||
import org.eclipse.jgit.util.TemporaryBuffer;
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ Export-Package: org.eclipse.jgit;version="0.9.0",
|
|||
org.eclipse.jgit.revplot;version="0.9.0",
|
||||
org.eclipse.jgit.revwalk;version="0.9.0",
|
||||
org.eclipse.jgit.revwalk.filter;version="0.9.0",
|
||||
org.eclipse.jgit.storage.file;version="0.9.0",
|
||||
org.eclipse.jgit.transport;version="0.9.0",
|
||||
org.eclipse.jgit.treewalk;version="0.9.0",
|
||||
org.eclipse.jgit.treewalk.filter;version="0.9.0",
|
||||
|
|
|
@ -64,10 +64,10 @@
|
|||
import org.eclipse.jgit.errors.CorruptObjectException;
|
||||
import org.eclipse.jgit.errors.UnmergedPathException;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.LockFile;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectInserter;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.storage.file.LockFile;
|
||||
import org.eclipse.jgit.util.IO;
|
||||
import org.eclipse.jgit.util.MutableInteger;
|
||||
import org.eclipse.jgit.util.NB;
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.errors.ConfigInvalidException;
|
||||
import org.eclipse.jgit.lib.RepositoryCache.FileKey;
|
||||
import org.eclipse.jgit.storage.file.FileBasedConfig;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
|
||||
import org.eclipse.jgit.util.FS;
|
||||
import org.eclipse.jgit.util.SystemReader;
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
import org.eclipse.jgit.revwalk.RevFlag;
|
||||
import org.eclipse.jgit.revwalk.RevObject;
|
||||
import org.eclipse.jgit.revwalk.RevSort;
|
||||
import org.eclipse.jgit.storage.file.PackIndexWriter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jgit.storage.file.RefDirectory;
|
||||
import org.eclipse.jgit.util.RefList;
|
||||
import org.eclipse.jgit.util.RefMap;
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.revwalk.RevObject;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.storage.file.ReflogReader;
|
||||
import org.eclipse.jgit.util.FS;
|
||||
import org.eclipse.jgit.util.IO;
|
||||
import org.eclipse.jgit.util.RawParseUtils;
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
|
||||
|
||||
/**
|
||||
* Base class to support constructing a {@link Repository}.
|
||||
* <p>
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.eclipse.jgit.errors.RepositoryNotFoundException;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
import org.eclipse.jgit.util.FS;
|
||||
import org.eclipse.jgit.util.IO;
|
||||
import org.eclipse.jgit.util.RawParseUtils;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
|
@ -43,7 +43,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.zip.DataFormatException;
|
|
@ -42,7 +42,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.util.zip.DataFormatException;
|
||||
import java.util.zip.Inflater;
|
|
@ -42,11 +42,21 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jgit.lib.AnyObjectId;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectDatabase;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectIdSubclassMap;
|
||||
import org.eclipse.jgit.lib.ObjectInserter;
|
||||
import org.eclipse.jgit.lib.ObjectLoader;
|
||||
import org.eclipse.jgit.lib.ObjectToPack;
|
||||
import org.eclipse.jgit.lib.PackWriter;
|
||||
|
||||
/**
|
||||
* The cached instance of an {@link ObjectDirectory}.
|
||||
* <p>
|
|
@ -44,12 +44,14 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.errors.CorruptObjectException;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
|
||||
/** Reads a deltified object which uses an offset to find its base. */
|
||||
class DeltaOfsPackedObjectLoader extends DeltaPackedObjectLoader {
|
||||
|
@ -72,7 +74,7 @@ public int getRawType() {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ObjectId getDeltaBase() throws IOException {
|
||||
ObjectId getDeltaBase() throws IOException {
|
||||
final ObjectId id = pack.findObjectForOffset(deltaBase);
|
||||
if (id == null)
|
||||
throw new CorruptObjectException(
|
|
@ -44,7 +44,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.MessageFormat;
|
||||
|
@ -52,6 +52,8 @@
|
|||
|
||||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.errors.CorruptObjectException;
|
||||
import org.eclipse.jgit.lib.BinaryDelta;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
|
||||
/** Reader for a deltified object stored in a pack file. */
|
||||
abstract class DeltaPackedObjectLoader extends PackedObjectLoader {
|
||||
|
@ -67,7 +69,7 @@ abstract class DeltaPackedObjectLoader extends PackedObjectLoader {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void materialize(final WindowCursor curs) throws IOException {
|
||||
void materialize(final WindowCursor curs) throws IOException {
|
||||
if (cachedBytes != null) {
|
||||
return;
|
||||
}
|
|
@ -44,11 +44,13 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jgit.errors.MissingObjectException;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
|
||||
/** Reads a deltified object which uses an {@link ObjectId} to find its base. */
|
||||
class DeltaRefPackedObjectLoader extends DeltaPackedObjectLoader {
|
||||
|
@ -74,7 +76,7 @@ public int getRawType() {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ObjectId getDeltaBase() throws IOException {
|
||||
ObjectId getDeltaBase() throws IOException {
|
||||
return deltaBase;
|
||||
}
|
||||
}
|
|
@ -47,7 +47,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
|
@ -56,6 +56,8 @@
|
|||
|
||||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.errors.ConfigInvalidException;
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.util.IO;
|
||||
import org.eclipse.jgit.util.RawParseUtils;
|
||||
|
|
@ -41,11 +41,18 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jgit.lib.AnyObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectDatabase;
|
||||
import org.eclipse.jgit.lib.ObjectLoader;
|
||||
import org.eclipse.jgit.lib.ObjectReader;
|
||||
import org.eclipse.jgit.lib.ObjectToPack;
|
||||
import org.eclipse.jgit.lib.PackWriter;
|
||||
|
||||
abstract class FileObjectDatabase extends ObjectDatabase {
|
||||
@Override
|
||||
public ObjectReader newReader() {
|
|
@ -44,7 +44,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -54,8 +54,16 @@
|
|||
|
||||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.errors.ConfigInvalidException;
|
||||
import org.eclipse.jgit.lib.FileObjectDatabase.AlternateHandle;
|
||||
import org.eclipse.jgit.lib.FileObjectDatabase.AlternateRepository;
|
||||
import org.eclipse.jgit.lib.BaseRepositoryBuilder;
|
||||
import org.eclipse.jgit.lib.ConfigConstants;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.RefDatabase;
|
||||
import org.eclipse.jgit.lib.RefUpdate;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.storage.file.FileObjectDatabase.AlternateHandle;
|
||||
import org.eclipse.jgit.storage.file.FileObjectDatabase.AlternateRepository;
|
||||
import org.eclipse.jgit.util.SystemReader;
|
||||
|
||||
/**
|
||||
|
@ -115,7 +123,16 @@ public FileRepository(final File gitDir) throws IOException {
|
|||
this(new FileRepositoryBuilder().setGitDir(gitDir).setup());
|
||||
}
|
||||
|
||||
FileRepository(final BaseRepositoryBuilder options) throws IOException {
|
||||
/**
|
||||
* Create a repository using the local file system.
|
||||
*
|
||||
* @param options
|
||||
* description of the repository's important paths.
|
||||
* @throws IOException
|
||||
* the user configuration file or repository configuration file
|
||||
* cannot be accessed.
|
||||
*/
|
||||
public FileRepository(final BaseRepositoryBuilder options) throws IOException {
|
||||
super(options);
|
||||
|
||||
userConfig = SystemReader.getInstance().openUserConfig(getFS());
|
|
@ -41,11 +41,13 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jgit.lib.BaseRepositoryBuilder;
|
||||
|
||||
/**
|
||||
* Constructs a {@link FileRepository}.
|
||||
* <p>
|
|
@ -41,10 +41,13 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.StoredObjectRepresentation;
|
||||
|
||||
class LocalObjectRepresentation extends StoredObjectRepresentation {
|
||||
final PackedObjectLoader ldr;
|
||||
|
|
@ -41,8 +41,10 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import org.eclipse.jgit.lib.ObjectToPack;
|
||||
import org.eclipse.jgit.lib.StoredObjectRepresentation;
|
||||
import org.eclipse.jgit.revwalk.RevObject;
|
||||
|
||||
/** {@link ObjectToPack} for {@link ObjectDirectory}. */
|
|
@ -42,7 +42,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
|
@ -57,6 +57,8 @@
|
|||
import java.text.MessageFormat;
|
||||
|
||||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
|
||||
/**
|
||||
* Git style file locking and replacement.
|
|
@ -41,7 +41,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
|
@ -62,6 +62,15 @@
|
|||
|
||||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.errors.PackMismatchException;
|
||||
import org.eclipse.jgit.lib.AnyObjectId;
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
import org.eclipse.jgit.lib.ObjectDatabase;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectInserter;
|
||||
import org.eclipse.jgit.lib.ObjectLoader;
|
||||
import org.eclipse.jgit.lib.ObjectToPack;
|
||||
import org.eclipse.jgit.lib.PackWriter;
|
||||
import org.eclipse.jgit.lib.RepositoryCache;
|
||||
import org.eclipse.jgit.lib.RepositoryCache.FileKey;
|
||||
import org.eclipse.jgit.util.FS;
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.EOFException;
|
||||
import java.io.File;
|
||||
|
@ -58,6 +58,11 @@
|
|||
import java.util.zip.DeflaterOutputStream;
|
||||
|
||||
import org.eclipse.jgit.errors.ObjectWritingException;
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.CoreConfig;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectInserter;
|
||||
|
||||
/** Creates loose objects in a {@link ObjectDirectory}. */
|
||||
class ObjectDirectoryInserter extends ObjectInserter {
|
|
@ -43,7 +43,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.EOFException;
|
||||
import java.io.File;
|
||||
|
@ -65,6 +65,11 @@
|
|||
import org.eclipse.jgit.errors.PackInvalidException;
|
||||
import org.eclipse.jgit.errors.PackMismatchException;
|
||||
import org.eclipse.jgit.errors.StoredObjectRepresentationNotAvailableException;
|
||||
import org.eclipse.jgit.lib.AnyObjectId;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectToPack;
|
||||
import org.eclipse.jgit.lib.PackOutputStream;
|
||||
import org.eclipse.jgit.util.LongList;
|
||||
import org.eclipse.jgit.util.NB;
|
||||
import org.eclipse.jgit.util.RawParseUtils;
|
|
@ -42,7 +42,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
|
@ -53,6 +53,9 @@
|
|||
|
||||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.errors.MissingObjectException;
|
||||
import org.eclipse.jgit.lib.AnyObjectId;
|
||||
import org.eclipse.jgit.lib.MutableObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.util.IO;
|
||||
import org.eclipse.jgit.util.NB;
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -53,6 +53,9 @@
|
|||
import java.util.NoSuchElementException;
|
||||
|
||||
import org.eclipse.jgit.errors.CorruptObjectException;
|
||||
import org.eclipse.jgit.lib.AnyObjectId;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.util.IO;
|
||||
import org.eclipse.jgit.util.NB;
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -51,6 +51,9 @@
|
|||
|
||||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.errors.MissingObjectException;
|
||||
import org.eclipse.jgit.lib.AnyObjectId;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.util.IO;
|
||||
import org.eclipse.jgit.util.NB;
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -52,6 +52,8 @@
|
|||
import java.util.List;
|
||||
|
||||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.transport.PackedObjectInfo;
|
||||
import org.eclipse.jgit.util.NB;
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
|
@ -41,7 +41,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
|
@ -41,11 +41,13 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
|
||||
/** Keeps track of a {@link PackFile}'s associated <code>.keep</code> file. */
|
||||
public class PackLock {
|
||||
private final File keepFile;
|
|
@ -41,14 +41,15 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.errors.CorruptObjectException;
|
||||
import org.eclipse.jgit.lib.PackIndex.MutableEntry;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.storage.file.PackIndex.MutableEntry;
|
||||
|
||||
/**
|
||||
* <p>
|
|
@ -44,10 +44,13 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectLoader;
|
||||
|
||||
/**
|
||||
* Base class for a set of object loader classes for packed objects.
|
||||
*/
|
||||
|
@ -92,7 +95,7 @@ abstract class PackedObjectLoader extends ObjectLoader {
|
|||
* @throws IOException
|
||||
* the object cannot be read.
|
||||
*/
|
||||
public abstract void materialize(WindowCursor curs) throws IOException;
|
||||
abstract void materialize(WindowCursor curs) throws IOException;
|
||||
|
||||
public final int getType() {
|
||||
return objectType;
|
||||
|
@ -110,7 +113,7 @@ public final byte[] getCachedBytes() {
|
|||
/**
|
||||
* @return offset of object header within pack file
|
||||
*/
|
||||
public final long getObjectOffset() {
|
||||
final long getObjectOffset() {
|
||||
return objectOffset;
|
||||
}
|
||||
|
||||
|
@ -120,5 +123,5 @@ public final long getObjectOffset() {
|
|||
* @throws IOException
|
||||
* when delta base cannot read.
|
||||
*/
|
||||
public abstract ObjectId getDeltaBase() throws IOException;
|
||||
abstract ObjectId getDeltaBase() throws IOException;
|
||||
}
|
|
@ -44,7 +44,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import static org.eclipse.jgit.lib.Constants.CHARSET;
|
||||
import static org.eclipse.jgit.lib.Constants.HEAD;
|
||||
|
@ -76,6 +76,18 @@
|
|||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.errors.ObjectWritingException;
|
||||
import org.eclipse.jgit.events.RefsChangedEvent;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.CoreConfig;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectIdRef;
|
||||
import org.eclipse.jgit.lib.PersonIdent;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.RefComparator;
|
||||
import org.eclipse.jgit.lib.RefDatabase;
|
||||
import org.eclipse.jgit.lib.RefUpdate;
|
||||
import org.eclipse.jgit.lib.RefWriter;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.lib.SymbolicRef;
|
||||
import org.eclipse.jgit.revwalk.RevObject;
|
||||
import org.eclipse.jgit.revwalk.RevTag;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
|
@ -42,11 +42,15 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.RefRename;
|
||||
import org.eclipse.jgit.lib.RefUpdate;
|
||||
import org.eclipse.jgit.lib.RefUpdate.Result;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
|
|
@ -42,12 +42,16 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import static org.eclipse.jgit.lib.Constants.encode;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.RefUpdate;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
|
||||
/** Updates any reference stored by {@link RefDirectory}. */
|
||||
class RefDirectoryUpdate extends RefUpdate {
|
||||
private final RefDirectory database;
|
|
@ -42,7 +42,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
|
@ -52,6 +52,10 @@
|
|||
import java.util.List;
|
||||
|
||||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.PersonIdent;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.util.IO;
|
||||
import org.eclipse.jgit.util.RawParseUtils;
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.lang.ref.SoftReference;
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
|
@ -52,6 +52,10 @@
|
|||
|
||||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.errors.CorruptObjectException;
|
||||
import org.eclipse.jgit.lib.AnyObjectId;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.InflaterCache;
|
||||
import org.eclipse.jgit.lib.ObjectLoader;
|
||||
import org.eclipse.jgit.util.IO;
|
||||
import org.eclipse.jgit.util.MutableInteger;
|
||||
import org.eclipse.jgit.util.RawParseUtils;
|
|
@ -43,7 +43,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.MessageFormat;
|
||||
|
@ -51,6 +51,8 @@
|
|||
|
||||
import org.eclipse.jgit.JGitText;
|
||||
import org.eclipse.jgit.errors.CorruptObjectException;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
|
||||
/** Reader for a non-delta (just deflated) object in a pack file. */
|
||||
class WholePackedObjectLoader extends PackedObjectLoader {
|
||||
|
@ -64,7 +66,7 @@ class WholePackedObjectLoader extends PackedObjectLoader {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void materialize(final WindowCursor curs) throws IOException {
|
||||
void materialize(final WindowCursor curs) throws IOException {
|
||||
if (cachedBytes != null) {
|
||||
return;
|
||||
}
|
||||
|
@ -104,7 +106,7 @@ public long getRawSize() {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ObjectId getDeltaBase() {
|
||||
ObjectId getDeltaBase() {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -42,7 +42,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.ReferenceQueue;
|
|
@ -41,7 +41,9 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import org.eclipse.jgit.lib.Config;
|
||||
|
||||
/** Configuration parameters for {@link WindowCache}. */
|
||||
public class WindowCacheConfig {
|
|
@ -42,7 +42,7 @@
|
|||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.eclipse.jgit.lib;
|
||||
package org.eclipse.jgit.storage.file;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.zip.DataFormatException;
|
||||
|
@ -50,6 +50,15 @@
|
|||
|
||||
import org.eclipse.jgit.errors.MissingObjectException;
|
||||
import org.eclipse.jgit.errors.StoredObjectRepresentationNotAvailableException;
|
||||
import org.eclipse.jgit.lib.AnyObjectId;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.InflaterCache;
|
||||
import org.eclipse.jgit.lib.ObjectLoader;
|
||||
import org.eclipse.jgit.lib.ObjectReader;
|
||||
import org.eclipse.jgit.lib.ObjectReuseAsIs;
|
||||
import org.eclipse.jgit.lib.ObjectToPack;
|
||||
import org.eclipse.jgit.lib.PackOutputStream;
|
||||
import org.eclipse.jgit.lib.PackWriter;
|
||||
import org.eclipse.jgit.revwalk.RevObject;
|
||||
|
||||
/** Active handle to a ByteWindow. */
|
|
@ -61,7 +61,6 @@
|
|||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.MutableObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.PackLock;
|
||||
import org.eclipse.jgit.lib.ProgressMonitor;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.Config.SectionParser;
|
||||
|
@ -73,6 +72,7 @@
|
|||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.revwalk.filter.CommitTimeRevFilter;
|
||||
import org.eclipse.jgit.revwalk.filter.RevFilter;
|
||||
import org.eclipse.jgit.storage.file.PackLock;
|
||||
import org.eclipse.jgit.transport.PacketLineIn.AckNackResult;
|
||||
import org.eclipse.jgit.util.TemporaryBuffer;
|
||||
|
||||
|
|
|
@ -68,13 +68,13 @@
|
|||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectIdRef;
|
||||
import org.eclipse.jgit.lib.PackLock;
|
||||
import org.eclipse.jgit.lib.ProgressMonitor;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.revwalk.RevFlag;
|
||||
import org.eclipse.jgit.revwalk.RevObject;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.storage.file.PackLock;
|
||||
import org.eclipse.jgit.util.IO;
|
||||
import org.eclipse.jgit.util.RawParseUtils;
|
||||
|
||||
|
|
|
@ -51,9 +51,9 @@
|
|||
|
||||
import org.eclipse.jgit.errors.TransportException;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.PackLock;
|
||||
import org.eclipse.jgit.lib.ProgressMonitor;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.storage.file.PackLock;
|
||||
|
||||
/**
|
||||
* Lists known refs from the remote and copies objects of selected refs.
|
||||
|
|
|
@ -63,14 +63,14 @@
|
|||
import org.eclipse.jgit.errors.NotSupportedException;
|
||||
import org.eclipse.jgit.errors.TransportException;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.LockFile;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.PackLock;
|
||||
import org.eclipse.jgit.lib.ProgressMonitor;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.revwalk.ObjectWalk;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.storage.file.LockFile;
|
||||
import org.eclipse.jgit.storage.file.PackLock;
|
||||
|
||||
class FetchProcess {
|
||||
/** Transport we will fetch over. */
|
||||
|
|
|
@ -75,11 +75,11 @@
|
|||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectIdSubclassMap;
|
||||
import org.eclipse.jgit.lib.ObjectLoader;
|
||||
import org.eclipse.jgit.lib.PackIndexWriter;
|
||||
import org.eclipse.jgit.lib.PackLock;
|
||||
import org.eclipse.jgit.lib.ProgressMonitor;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.lib.ObjectReader;
|
||||
import org.eclipse.jgit.storage.file.PackIndexWriter;
|
||||
import org.eclipse.jgit.storage.file.PackLock;
|
||||
import org.eclipse.jgit.util.NB;
|
||||
|
||||
/** Indexes Git pack files for local use. */
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
import org.eclipse.jgit.lib.NullProgressMonitor;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectIdSubclassMap;
|
||||
import org.eclipse.jgit.lib.PackLock;
|
||||
import org.eclipse.jgit.lib.PersonIdent;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.RefUpdate;
|
||||
|
@ -86,6 +85,7 @@
|
|||
import org.eclipse.jgit.revwalk.RevObject;
|
||||
import org.eclipse.jgit.revwalk.RevTree;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.storage.file.PackLock;
|
||||
import org.eclipse.jgit.transport.ReceiveCommand.Result;
|
||||
import org.eclipse.jgit.transport.RefAdvertiser.PacketLineOutRefAdvertiser;
|
||||
import org.eclipse.jgit.util.io.InterruptTimer;
|
||||
|
|
|
@ -85,10 +85,10 @@
|
|||
import org.eclipse.jgit.lib.ObjectIdRef;
|
||||
import org.eclipse.jgit.lib.ProgressMonitor;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.RefDirectory;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.lib.SymbolicRef;
|
||||
import org.eclipse.jgit.lib.Config.SectionParser;
|
||||
import org.eclipse.jgit.storage.file.RefDirectory;
|
||||
import org.eclipse.jgit.util.HttpSupport;
|
||||
import org.eclipse.jgit.util.IO;
|
||||
import org.eclipse.jgit.util.RawParseUtils;
|
||||
|
|
|
@ -60,8 +60,8 @@
|
|||
import org.eclipse.jgit.errors.NotSupportedException;
|
||||
import org.eclipse.jgit.errors.TransportException;
|
||||
import org.eclipse.jgit.lib.Constants;
|
||||
import org.eclipse.jgit.lib.FileRepository;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.storage.file.FileRepository;
|
||||
import org.eclipse.jgit.util.FS;
|
||||
import org.eclipse.jgit.util.io.MessageWriter;
|
||||
import org.eclipse.jgit.util.io.StreamCopyThread;
|
||||
|
|
|
@ -68,15 +68,11 @@
|
|||
import org.eclipse.jgit.lib.FileMode;
|
||||
import org.eclipse.jgit.lib.MutableObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectChecker;
|
||||
import org.eclipse.jgit.lib.ObjectDirectory;
|
||||
import org.eclipse.jgit.lib.ObjectId;
|
||||
import org.eclipse.jgit.lib.ObjectInserter;
|
||||
import org.eclipse.jgit.lib.PackIndex;
|
||||
import org.eclipse.jgit.lib.PackLock;
|
||||
import org.eclipse.jgit.lib.ProgressMonitor;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.lib.UnpackedObjectLoader;
|
||||
import org.eclipse.jgit.revwalk.DateRevQueue;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.eclipse.jgit.revwalk.RevFlag;
|
||||
|
@ -84,6 +80,10 @@
|
|||
import org.eclipse.jgit.revwalk.RevTag;
|
||||
import org.eclipse.jgit.revwalk.RevTree;
|
||||
import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.storage.file.ObjectDirectory;
|
||||
import org.eclipse.jgit.storage.file.PackIndex;
|
||||
import org.eclipse.jgit.storage.file.PackLock;
|
||||
import org.eclipse.jgit.storage.file.UnpackedObjectLoader;
|
||||
import org.eclipse.jgit.treewalk.TreeWalk;
|
||||
|
||||
/**
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
import org.eclipse.jgit.lib.ObjectIdRef;
|
||||
import org.eclipse.jgit.lib.ProgressMonitor;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.RefDirectory;
|
||||
import org.eclipse.jgit.storage.file.RefDirectory;
|
||||
import org.eclipse.jgit.util.IO;
|
||||
|
||||
/**
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
import java.net.UnknownHostException;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.eclipse.jgit.lib.FileBasedConfig;
|
||||
import org.eclipse.jgit.storage.file.FileBasedConfig;
|
||||
|
||||
/**
|
||||
* Interface to read values from the system.
|
||||
|
|
Loading…
Reference in New Issue