end-offset is
+ the length of the string).
+
+ other; 0 if this abbreviation exactly matches the
+ first
+ other.name();
+ >0 if this abbreviation names an object that is after
+ other.
+ bs
+ to start the compare at. At least
+ 20 bytes, starting at this position are required.
+
+ other; 0 if this abbreviation exactly matches the
+ first
+ other.name();
+ >0 if this abbreviation names an object that is after
+ other.
+ bs
+ to start the compare at. At least 5
+ ints, starting at this position are required.
+
+ other; 0 if this abbreviation exactly matches the
+ first
+ other.name();
+ >0 if this abbreviation names an object that is after
+ other.
+ getByte(0)
+ should instead use the much faster
+ special case variant
+ index
+ . Returned values
+ are unsigned and thus are in the range [0,255] rather than the
+ signed byte range of [-128, 127].
+ index
+ is less than 0, equal to
+ bs
+ to start the compare at. At least
+ 20 bytes, starting at this position are required.
+
+ bs
+ to start the compare at. At least 5
+ integers, starting at this position are required.
+
+ this if this instance is an unsubclassed
+ instance of
+ this is a possibly subclassed (but
+ immutable) identity and the application needs a lightweight identity
+ only reference.
+ this if this is already
+ an immutable instance.
+ getByte(0)
+ .
+ this
+ (for chaining calls).
+ MERGE_HEAD
+ , or the index file. If
+ null
+ the path is
+ assumed to be
+ workTree/.git
+ .
+ GIT_DIR
+ , the repository meta directory.
+
+ this
+ (for chaining calls).
+ GIT_OBJECT_DIRECTORY
+ , the directory where the
+ repository's object files are stored.
+
+ this
+ (for chaining calls).
+ GIT_ALTERNATE_OBJECT_DIRECTORIES
+ .
+ this
+ (for chaining calls).
+ GIT_ALTERNATE_OBJECT_DIRECTORIES
+ .
+ this
+ (for chaining calls).
+ GIT_ALTERNATE_OBJECT_DIRECTORIES
+ .
+ this
+ (for chaining calls).
+ this
+ (for chaining calls).
+ this
+ (for chaining calls).
+ GIT_WORK_TREE
+ , the working directory of the checkout.
+
+ this
+ (for chaining calls).
+ workTree
+ . This may be null to assume the
+ default
+ gitDiir/index
+ .
+ GIT_INDEX_FILE
+ , the index file location.
+
+ this
+ (for chaining calls).
+ GIT_DIR
+ and
+ GIT_WORK_TREE
+ to configure this builder
+ instance. If an environment variable is set, it overrides the value
+ already set in this builder.
+ this
+ (for chaining calls).
+ GIT_DIR
+ and
+ GIT_WORK_TREE
+ to configure this builder
+ instance. If a property is already set in the builder, the environment
+ variable is not used.
+ this
+ (for chaining calls).
+ GIT_CEILING_DIRECTORIES
+ .
+ this
+ (for chaining calls).
+ GIT_CEILING_DIRECTORIES
+ .
+ this
+ (for chaining calls).
+ GIT_CEILING_DIRECTORIES
+ .
+ this
+ (for chaining calls).
+ GIT_DIR
+ by searching up the file system.
+
+ Starts from the current working directory of the JVM and scans up through
+ the directory tree until a Git repository is found. Success can be
+ determined by checking for
+ getGitDir() != null
+ .
+
+ The search can be limited to specific spaces of the local filesystem by
+ this
+ (for chaining calls).
+ GIT_DIR
+ by searching up the file system.
+
+ Starts from the supplied directory path and scans up through the parent
+ directory tree until a Git repository is found. Success can be determined
+ by checking for
+ getGitDir() != null
+ .
+
+ The search can be limited to specific spaces of the local filesystem by
+ this
+ (for chaining calls).
+ this
+ gitDir
+ or
+ workTree
+ to be set.
+ gitDir/config
+ , or returns an
+ empty configuration if gitDir was not set.
+ this
+
+ .gitmodules
+ file.
+ .config
+ ,
+ .gitconfig
+ ,
+ .gitmodules
+ file.
+ defaultValue
+ .
+ EnumType.values()
+ .
+
+ section the key is grouped within.
+ subsection name, such a remote or branch name.
+ name of the key to get.
+ default value to return if no value was present.
+ defaultValue
+ .
+ true is returned (which is the default behavior),
+ false are
+ responsible for issuing
+ + [section "subsection"] + name = value ++
+ [section "subsection"] + name = value ++
+ [section "subsection"] + name = value ++
+ [section "subsection"] + name = value ++
+ [section "subsection"] + name = value ++
+ [section "subsection"] + name = value ++
this
+ .
+ SectionParser
+ as a key of a HashMap.
+
+ As the
+ SectionParser
+ itself is used as the key of the internal
+ HashMap applications should be careful to ensure the SectionParser key
+ does not retain unnecessary application state which may cause memory to
+ be held longer than expected.
+ HEAD
+ reference and is thus the current
+ branch's position in history.
+
+
+ the second parent of this merge commit. Usually this is the
+ branch being merged into the current branch.
+
+ typeString where the parse
+ should start. Updated with the new position (just past
+ endMark when the parse is successful.
+
+ typeString.
+ core.autocrlf
+ .
+ FileMode class provides access to constants defining the modes
+ actually used by GIT.
+ buf
+ for first digit.
+
+ revstr cannot be resolved.
+
+ iterator for working directory
+ index
+ . Values are
+ unsigned and thus are in the range [0,255] rather than the
+ signed byte range of [-128, 127].
+
+ index
+ is less than 0, equal to
+ 1, to indicate a single unit of
+ work has been finished by the caller.
+ ObjectInserter
+ to insert new objects.
+
+ The returned inserter is not itself thread-safe, but multiple concurrent
+ inserter instances created from the same
+ ObjectDatabase
+ must be
+ thread-safe.
+ ObjectReader
+ to read existing objects.
+
+ The returned reader is not itself thread-safe, but multiple concurrent
+ reader instances created from the same
+ ObjectDatabase
+ must be
+ thread-safe.
+ Ref
+ in the same database and always
+ uses that other reference's value as its own.
+ this
+ .
+
+ If
+ + return isSymbolic() ? getTarget().getLeaf() : this; ++
this
+ .
+
+ If
+ this
+ .
+ this
+ .
+ ref^{} (the ref peeled to commit).ref^{} (the ref peeled to commit).id
+ points to.
+
+ newValue
+ , but only if there is not already an object for
+ the same object name. Callers can tell if the value is new by checking
+ the return value with reference equality:
+ + V obj = ...; + boolean wasNew = map.addIfAbsent(obj) == obj; ++
newValue
+ if stored, or the prior value already stored and
+ that would have been returned had the caller used
+ get(newValue)
+ first.
+ ObjectDatabase
+ .
+
+ An inserter is not thread-safe. Individual threads should each obtain their
+ own unique inserter instance, or must arrange for locking at a higher level
+ to ensure the inserter is in use by no more than one thread at a time.
+
+ Objects written by an inserter may not be immediately visible for reading
+ after the insert method completes. Callers must invoke either
+ data
+ .
+
+
+ number of bytes to copy from
+ data
+ .
+
+ in
+ .
+
+
+ stream providing the object content. The caller is responsible
+ for closing the stream.
+
+ data
+ .
+
+
+ number of bytes to copy from
+ data
+ .
+
+ in
+ .
+
+
+ stream providing the object content. The caller is responsible
+ for closing the stream.
+
+ sizeLimit
+ this method
+ will provide it as a byte array, even if
+ sizeLimit
+ , or if
+ sizeLimit
+ this method
+ will provide it as a byte array, even if
+ sizeLimit
+ , or if
+ packed-refs file, with others.packed-refs file, with others.
+
+ Updating this ref requires rewriting the file, with perhaps many
+ other refs being included at the same time.
+ ""
+ , ensuring that absolute references
+ are resolved without further mangling.
+ true
+ and
+ name
+ is currently a
+ getRefs(ALL).get(name)
+ .
+ null
+ .
+ /
+ .
+ If the empty string (
+ prefix
+ removed from the start
+ of each key. The map can be an unsorted map.
+ getRefs(ALL) but are accepted by
+ ref
+ if
+ ref.isPeeled()
+ is true; otherwise a new
+ Ref object representing the same data as Ref, but isPeeled() will
+ be true and getPeeledObjectId() will contain the peeled object
+ (or null).
+ HEAD
+ , then the
+ HEAD symbolic reference is updated to point to the new destination.
+ Constants#HEAD
+ reference needs to be linked
+ to the new destination name.
+ HEAD
+ cannot be read.
+ ref.getObjectId()
+ will be used to seed
+ result
+ result
+ true
+ if the ref log message should show the result.
+ + return update(new RevWalk(getRepository())); ++
+ return delete(new RevWalk(getRepository())); ++
refs/
+ .
+
+ create(false)
+ .
+ refs/heads
+ ,
+ refs/tags
+ , or
+ refs/remotes
+ namespaceABBREV
+ as an abbreviated SHA-1.id^1
+ id~3
+ is equivalent to
+ id^1^1^1
+ or
+ id^^^
+ .revstr
+ contains an abbreviated ObjectId and this
+ repository contains more than one object which match to the
+ input abbreviation.
+ HEAD
+ points to.
+
+ This is essentially the same as doing:
+ + return getRef(Constants.HEAD).getTarget().getName() ++ Except when HEAD is detached, in which case this method returns the + current ObjectId in hexadecimal string format. +
refs/heads/master
+ ) or
+ an ObjectId in hex format if the current branch is detached.
+ HEAD
+ points to.
+
+ This is essentially the same as
+ refs/heads/
+ is removed from the reference before
+ it is returned to the caller.
+ master
+ ), or an
+ ObjectId in hex format if the current branch is detached.
+ ref if ref.isPeeled() is true; else a
+ new Ref object representing the same data as Ref, but isPeeled()
+ will be true and getPeeledObjectId will contain the peeled object
+ (or null).
+ null
+ if this file doesn't exist
+ null is specified as message the file will
+ be deleted.
+ null to
+ delete the file
+
+ null
+ if this file doesn't exist. Also if the file exists
+ but is empty
+ null
+ will be returned
+ null is specified as list of commits
+ the file will be deleted
+ null to delete the file
+
+ null
+ if this file
+ doesn't exist. Also if the file exists but is empty
+ null
+ will be returned
+ null to
+ delete the file
+
+ null
+ to delete the file
+
+ null
+ if this file
+ doesn't exist. Also if the file exists but is empty
+ null
+ will be returned
+ null
+ if this file doesn't exist
+ null is specified as
+ message the file will be deleted.
+ null to
+ delete the file
+
+ + new RepositoryBuilder() // + .setGitDir(gitDirArgument) // --git-dir if supplied, no-op if null + .readEnviroment() // scan environment GIT_* variables + .findGitDir() // scan up the file system tree + .build() ++
RepositoryNotFoundException
+ . If false, a repository instance
+ is created and registered anyway.
+
+ mustExist
+ is true.
+ mustExist
+ is true.
+ directory
+ // assume exact matchdirectory
+ + "/.git" // assume working directorydirectory
+ + ".git" // assume baredirectory
+ // assume exact matchdirectory
+ + "/.git" // assume working directorydirectory
+ + ".git" // assume bareobj
+ . Must be a valid type code.
+
+ refs/tags/
+ prefix).
+ refs/
+ as typically a tag is stored under the
+ reference derived from
+ "refs/tags/" + getTag()
+ .
+
+ time
+ .
+
+ workCurr * 100 / workTotal
+ .
+
+ workCurr * 100 / workTotal
+ .
+
+ Add
+ command. It has setters for all
+ supported options and arguments of this command and a
+ org.eclipse.jgit.api
+
+ This class ensures that all commands fulfill the
+ false
+ true it is allowed to call
+ true
+ . If not then
+ an
+ false
+ this
+ this
+ Add
+ command. Each instance of this class should only
+ be used for one invocation of the command. Don't call this method twice
+ on an instance.
+ filepattern
+ against already tracked files in the index rather than the
+ working tree. That means that it will never stage new files,
+ but that it will stage modified new contents of tracked files
+ and that it will remove files from the index if the
+ corresponding files in the working tree have been removed.
+ In contrast to the git command line a
+ filepattern
+ must
+ exist also if update is set to true as there is no
+ concept of a working directory here.
+
+ this
+ Commit
+ command. It has setters for all
+ supported options and arguments of this command and a
+ commit
+ command with all the options and parameters
+ collected by the setter methods of this class. Each instance of this
+ class should only be used for one invocation of the command (means: one
+ call to
+ only, lookup is also tried with (parent) directory paths
+ (e.g. "d1/d2" and "d1").
+ only; -1 if no item matchescommit
+
+ this
+ commitcommit
+ . If no committer is explicitly
+ specified because this method is never called or called with
+ null
+ value then the committer will be deduced from config info in repository,
+ with current time.
+ commit
+
+ this
+ commit
+ . If no committer is explicitly
+ specified because this method is never called then the committer will be
+ deduced from config info in repository, with current time.
+ commit
+
+
+ the email of the committer used for the
+ commit
+
+ this
+ commit
+ . If no committer was
+ specified
+ null
+ is returned and the default
+ commit
+ . If no author is explicitly
+ specified because this method is never called or called with
+ null
+ value then the author will be set to the committer or to the original
+ author when amending.
+ commit
+
+ this
+ commit
+ . If no author is explicitly
+ specified because this method is never called then the author will be set
+ to the committer or to the original author when amending.
+ commit
+
+
+ the email of the author used for the
+ commit
+
+ this
+ commit
+ . If no author was
+ specified
+ null
+ is returned and the default
+ this
+ this
+ this
+ this
+ this
+ commit()
+ method returning an instance of
+ the
+ CommitCommand
+ class. The
+ CommitCommand
+ class has setters
+ for all the arguments and options. The
+ CommitCommand
+ class also has a
+ call
+ method to actually execute the commit. The following code show's
+ how to do a simple commit:
+
+ Git git = new Git(myRepo);
+ git.commit().setMessage("Fix393").setAuthor(developerIdent).call();
+
+ All mandatory parameters for commands have to be specified in the methods of
+ this class, the optional parameters have to be specified by the
+ setter-methods of the Command class.
+
+ This class is intended to be used internally (e.g. by JGit tests) or by
+ external components (EGit, third-party tools) when they need exactly the
+ functionality of a GitPorcelain command. There are use-cases where this class
+ is not optimal and where you should use the more low-level JGit classes. The
+ methods in this class may for example offer too much functionality or they
+ offer the functionality with the wrong arguments.
+ .git
+ .
+
+ .git
+ .
+
+ filesystem abstraction to use when accessing the repository.
+ null
+ is not allowed
+
+ clone
+ command
+ clone
+ command
+ init
+ command
+ init
+ command
+ null
+ is not allowed
+
+ Commit
+ command
+ Commit
+ command
+ Log
+ command
+ Log
+ command
+ Merge
+ command
+ Merge
+ command
+ Pull
+ command
+ Add
+ command
+ Add
+ command
+ Tag
+ command
+ Tag
+ command
+ Fetch
+ command
+ Fetch
+ command
+ Push
+ command
+ Push
+ command
+ cherry-pick
+ command
+ cherry-pick
+ command
+ revert
+ command
+ cherry-pick
+ command
+ Rebase
+ command
+ rebase
+ command
+ rm
+ command
+ rm
+ command
+ checkout
+ command
+ checkout
+ command
+ reset
+ command
+ reset
+ command
+ status
+ command
+ status
+ command
+ ls-remote
+ command
+ status
+ command
+ clean
+ command
+ clean
+ command
+ blame
+ command
+ blame
+ command
+ reflog
+ command
+ reflog
+ command
+ diff
+ command
+ diff
+ command
+ submodule add
+ command
+ submodule init
+ command
+ submodule status
+ command
+ submodule sync
+ command
+ submodule update
+ command
+ apply
+ command
+ apply
+ command
+ Log
+ command. It has setters for all
+ supported options and arguments of this command and a
+ Log
+ command with all the options and parameters
+ collected by the setter methods (e.g.
+ this
+ IOException's
+ to be wrapped. Subclasses of
+ --not start
+ , or
+ ^start
+ this
+ IOException's
+ to be wrapped. Subclasses of
+ since..until
+ this
+ IOException's
+ to be wrapped. Subclasses of
+ this
+ this
+ this
+ this
+ Merge
+ command. It has setters for all
+ supported options and arguments of this command and a
+ Merge
+ command with all the options and parameters
+ collected by the setter methods (e.g.
+ this
+ this
+ this
+ this
+ true, will prepare the next commit in working tree and
+ index as if a real merge happened, but do not make the commit or move the
+ HEAD.
+ true, will prepare the next commit in working tree and
+ index as if a real merge happened, but do not make the commit or move the
+ HEAD. Otherwise, perform the merge and commit the result.
+
+ In case the merge was successful but this flag was set to
+ true a
+ this
+ Tag
+ command. It has setters for all
+ supported options and arguments of this command and a
+ tag
+ command with all the options and parameters
+ collected by the setter methods of this class. Each instance of this
+ class should only be used for one invocation of the command (means: one
+ call to
+ tag
+
+ this
+ tagtagtag
+
+ this
+ this
+ this
+ this
+ this
+ org.eclipse.jgit.api
+ this
+ #getCause()
+ .
+ HEAD
+ reference to exist
+ but couldn't find such a reference
+ diff.renames
+ .
+ includeTrees
+ it will add tree objects into result or not.
+ includeTrees
+ parameter is
+ true
+ it can't
+ be recursive.
+
+ include tree object's.
+ includeTrees
+ is true and given TreeWalk is
+ recursive. Or when given TreeWalk doesn't have exactly two
+ trees
+ /dev/null/dev/nullindex.index.index.index."a/"
+ , but may be any prefix desired by
+ the caller. Must not be null. Use the empty string to have no
+ prefix at all.
+
+ "b/"
+ , but may be any prefix desired by
+ the caller. Must not be null. Use the empty string to have no
+ prefix at all.
+
+ a
+ to make it
+ b
+ .
+ a
+ to make it
+ b
+ .
+ a
+ to make it
+ b
+ .
+ beginA == endA && beginB < endB is an insert edit,
+ that is sequence B inserted the elements in region
+ [beginB, endB) at beginA.
+
+ An edit where beginA < endA && beginB == endB is a delete edit,
+ that is sequence B has removed the elements between
+ [beginA, endA).
+
+ An edit where beginA < endA && beginB < endB is a replace edit,
+ that is sequence B has replaced the range of elements between
+ [beginA, endA) with those found in [beginB, endB).
+ this
+ edit that occurs
+ before
+ cut
+ starts.
+ this
+ edit that occurs
+ after
+ cut
+ ends.
+ edit
+ .
+ + H E L L O W O R L D + ____ + L \___ + O \___ + W \________ ++ + Since every D-path has exactly D horizontal or vertical elements, it can only + end on the diagonals -D, -D+2, ..., D-2, D. + + Since every furthest reaching D-path contains at least one furthest reaching + (D-1)-path (except for D=0), we can construct them recursively. + + Since we are really interested in the shortest edit path, we can start + looking for a 0-path, then a 1-path, and so on, until we find a path that + ends in the lower right corner. + + To save space, we do not need to store all paths (which has quadratic space + requirements), but generate the D-paths simultaneously from both sides. When + the ends meet, we will have found "the middle" of the path. From the end + points of that diagonal part, we can generate the rest recursively. + + This only requires linear space. + + The overall (runtime) complexity is: +
+ O(N * D^2 + 2 * N/2 * (D/2)^2 + 4 * N/4 * (D/4)^2 + ...) + = O(N * D^2 * 5 / 4) = O(N * D^2), ++ + (With each step, we have to find the middle parts of twice as many regions as + before, but the regions (as well as the D) are halved.) + + So the overall runtime complexity stays the same with linear space, albeit + with a larger constant factor. +
diff
+ method must be callable from concurrent threads
+ without data collisions. This permits some algorithms to use a singleton
+ pattern, with concurrent invocations using the same singleton. Other
+ algorithms may support parameterization, in which case the caller can create
+ a unique instance per thread.
+ cmp
+ 's rules. The
+ result list is never null.
+ [0,
+ Size()
+ ), like a standard Java List implementation.
+ Unlike a List, the members of the sequence are not directly obtainable.
+
+ Implementations of Sequence are primarily intended for use in content
+ difference detection algorithms, to produce an
+ [begin, end)
+ .
+ [start, end)
+ decoded as a String.
+ raw
+ to evaluate. This should be
+ raw.length
+ unless
+ raw
+ was over-allocated by
+ the caller.
+
+ nullgetEntries
+ has
+ been used to perform rename detection.
+ getEntries
+ was already invoked.
+ getEntries
+ was already invoked.
+ idHash.length == 1 << idHashBits
+ .
+ (1 << 28) - 1
+ . This sorts
+ lower list indices later in the matrix, giving precedence to files whose
+ names sort earlier in the tree.
+ i.path.build was false.
+ true
+ if this index contains unmerged paths. Means: at
+ least one entry is of a stage different from 0.
+ false
+ will be returned if all entries are of stage 0.
+ TreeWalk.
+
+ Like
+
+ final DirCache dirc = db.lockDirCache();
+ final DirCacheBuilder edit = dirc.builder();
+ final TreeWalk walk = new TreeWalk(db);
+ walk.reset();
+ walk.setRecursive(true);
+ walk.setFilter(PathFilter.create("name/to/remove"));
+ walk.addTree(new DirCacheBuildIterator(edit));
+ while (walk.next())
+ ; // do nothing on a match as we want to remove matches
+ edit.commit();
+
+ TreeWalk.
+
+ This is an iterator to adapt a loaded DirCache instance (such as
+ read from an existing .git/index file) to the tree structure
+ used by a TreeWalk, making it possible for applications to walk
+ over any combination of tree objects already in the object database, index
+ files, or working directories.
+ A is the name of a subtree and
+ c is a file within that subtree. The other two items are files
+ in the root level tree.
+ childPath where the child can
+ insert its data. The value at
+ childPath[childPathOffset-1] must be '/'.
+
+ capacity
+ bytes
+ this,
+ otherwise the caller would not be able to exit out of the subtree
+ iterator correctly and return to continue walking this.
+ this, otherwise
+ the caller would not be able to exit out of the subtree iterator
+ correctly and return to continue walking this.
+ back(1)
+ until
+ first()
+ is true. This is most likely not the most efficient
+ method of repositioning the iterator to its first entry, so subclasses
+ are strongly encouraged to override the method.
+ seek(1) but is called by
+ back(1)
+ would be an invalid request as there is no entry before the current one.
+ back(1)
+ would be an invalid request as there is no entry before the current one.
+
+ An empty iterator (one with no entries) will be
+ first() && eof().
+ DirCacheEntry which the final updated index must have to reflect
+ its new content.
+
+ For maximum performance applications should add entries in path name order.
+ Adding entries out of order is permitted, however a final sorting pass will
+ be implicitly performed during
+ pathPrefix. The ObjectId must be that of a
+ tree; the caller is responsible for dereferencing a tag or
+ commit (if necessary).
+
+ false if this method could not delete all the files
+ which should be deleted (e.g. because of of the files was
+ locked). In this case
+ false is returned the checkout was
+ successful and the working tree was updated for all other files.
+ true is returned when no such problem occurred
+ true if FileModes and ObjectIds are equal.
+ false otherwise
+ true, will scan first to see if it's possible to check
+ out, otherwise throw
+ false, it will silently deal with the problem.
+ checkoutEntry(Repository, File f, DirCacheEntry, ObjectReader)
+ instead which allows to reuse one
+ ObjectReader
+ for multiple
+ entries.
+
+ TODO: this method works directly on File IO, we may need another
+ abstraction (like WorkingTreeIterator). This way we could tell e.g.
+ Eclipse that Files in the workspace got changed
+ stage
+ is outside of the
+ range 0..3, inclusive.
+ stage
+ is outside of the
+ range 0..3, inclusive.
+ true if the entry is smudged, false
+ otherwise
+ mode
+ is
+ cache that is a member of this
+ tree. The path of cache[cacheIdx].path for the
+ range [0,pathOff-1) matches the complete path of
+ this tree, from the root of the repository.
+
+
+ number of bytes of cache[cacheIdx].path that
+ matches this tree's path. The value at array position
+ cache[cacheIdx].path[pathOff-1] is always '/' if
+ pathOff is > 0.
+
+ the writer to use when serializing to the store.
+ cache that are valid for
+ iteration.
+
+
+ first position of cache that is a member of this
+ tree. The path of cache[cacheIdx].path for the
+ range [0,pathOff-1) matches the complete path of
+ this tree, from the root of the repository.
+
+
+ number of bytes of cache[cacheIdx].path that
+ matches this tree's path. The value at array position
+ cache[cacheIdx].path[pathOff-1] is always '/' if
+ pathOff is > 0.
+
+ other.
+ isMatch(String, boolean) was previously
+ made, this will return whether or not the target was ignored.
+ isMatch(String, boolean) was previously
+ made, this will return whether or not the target was ignored. Otherwise
+ this just indicates whether the rule is non-negation or negation.
+ false if the merge will fail because the index entry
+ didn't match ours or the working-dir file was dirty and a
+ conflict occurred
+ null then an empty text will be used instead.
+ null is returned if this merge didn't
+ fail.
+ true if a failure occurred, false
+ otherwise
+ + NLS.setLocale(Locale.GERMAN); + TransportText t = NLS.getBundleFor(TransportText.class); ++
NLS.setLocale(Locale.getDefault()).
+
+ public class TransportText extends TranslationBundle {
+ public static TransportText get() {
+ return NLS.getBundleFor(TransportText.class);
+ }
+ public String repositoryNotFound;
+ public String transportError;
+ }
+
+ Second, define one or more resource bundle property files.
+
+ TransportText_en_US.properties:
+ repositoryNotFound=repository {0} not found
+ transportError=unknown error talking to {0}
+ TransportText_de.properties:
+ repositoryNotFound=repository {0} nicht gefunden
+ transportError=unbekannter Fehler w√§hrend der Kommunikation mit {0}
+ ...
+
+ Then make use of it:
+ + NLS.setLocale(Locale.GERMAN); // or skip this call to stick to the JVM default locale + ... + throw new TransportException(uri, TransportText.get().transportError); ++ The translated text is automatically injected into the public String fields + according to the locale set with +
String are considered.
+
+ The name of this (sub)class plus the given locale parameter
+ define the resource bundle to be loaded. In other words the
+ this.getClass().getName() is used as the
+ baseName parameter in the
+ buf.length) or the first position on the next
+ line. This is only used to avoid very long runs of '@' from
+ killing the scan loop.
+
+
+ GetParentCount()
+ + 1
+ representing the old revision character sets and the new
+ revision character set.
+
+ end - ptr.
+
+ ^[A-Za-z0-9-]+:
+ , while
+ the value is free-form, but must not contain an LF. Very common keys seen
+ in the wild are:
+ Signed-off-by
+ (agrees to Developer Certificate of Origin)Acked-by
+ (thinks change looks sane in context)Reported-by
+ (originally found the issue this change fixes)Tested-by
+ (validated change fixes the issue for them)CC
+ ,
+ Cc
+ (copy on all email related to this change)Bug
+ (link to project's bug tracking system)keyName
+ , ordered by their
+ order of appearance. Duplicates may be returned if the same
+ footer appeared more than once. Empty list if no footers appear
+ with the specified key, or there are no footers at all.
+ keyName
+ , ordered by their
+ order of appearance. Duplicates may be returned if the same
+ footer appeared more than once. Empty list if no footers appear
+ with the specified key, or there are no footers at all.
+ super.reset() to ensure the
+ basic information can be correctly cleared out.
+ applyFlag(matching, flag, 0, size()), but without
+ the incremental behavior.
+ rangeBegin then no
+ commits will be tested.
+
+ clearFlag(flag, 0, size()), but without the
+ incremental behavior.
+ applyFlag(RevFilter.NONE, flag, rangeBegin, rangeEnd).
+ rangeBegin then no
+ commits will be tested.
+
+ begin
+ that has the specified flag set on it; -1 if no match is found.
+ size()-1, to test the last commit in the
+ list.
+
+ begin
+ that has the specified flag set on it; -1 if no match is found.
+ base is an ancestor of tip if we
+ can find a path of commits that leads from tip and ends at
+ base.
+
+ This utility function resets the walker, inserts the two supplied
+ commits, and then executes a walk until an answer can be obtained.
+ Currently allocated RevFlags that have been added to RevCommit instances
+ will be retained through the reset.
+ tip.
+
+ commit to start iteration from, and which is most likely a
+ descendant (child) of base.
+
+ tip to
+ base (and thus base is fully merged
+ into tip); false otherwise.
+ AndRevFilter or OrRevFilter instances to
+ describe the boolean expression required by the application. Custom
+ filter implementations may also be constructed by applications.
+
+ Note that filters are not thread-safe and may not be shared by concurrent
+ RevWalk instances. Every RevWalk must be supplied its own unique filter,
+ unless the filter implementation specifically states it is (and always
+ will be) thread-safe. Callers may use
+ obj
+ is not an annotated tag,
+ obj
+ . Otherwise
+ the first non-tag object that
+ obj
+ references. The
+ returned object's headers have been parsed.
+ AND(path, ANY_DIFF)
+ , but also
+ triggers rename detection so that the path node is updated to include a prior
+ file name as the RevWalk traverses history.
+ The renames found will be reported to a
+ null
+ if none
+ Signed-off-by
+
+ Acked-by
+
+ CC
+
+ key.getName().equalsIgnorecase(getKey())
+ .
+ nameEnd - namePtr
+ is the length.
+ AndRevFilter and
+ OrRevFilter to create complex boolean expressions.
+
+ Applications should install the filter on a RevWalk by
+ ts.ts.ts.ts.since
+ and before or equal a given date/time until.
+ since
+ and before or equal a given date/time until.
+ since
+ and before or equal a given date/time until.
+ since
+ and before or equal a given date/time until.
+ a.a.a.a.a.a.dstbuf to start copying into.
+
+ number of bytes to copy. This value may exceed the number of
+ bytes remaining in the window starting at offset
+ pos.
+
+ cnt if cnt exceeded the number of
+ bytes available.
+ dstbuf to start copying into.
+
+ number of bytes to copy. This value may exceed the number of
+ bytes remaining in the window starting at offset
+ pos.
+
+ cnt if cnt exceeded the number of
+ bytes available.
+ + new FileRepositoryBuilder().setGitDir(gitDir).build() ++
+ new FileRepositoryBuilder() // + .setGitDir(gitDirArgument) // --git-dir if supplied, no-op if null + .readEnviroment() // scan environment GIT_* variables + .findGitDir() // scan up the file system tree + .build() ++
DeltaStream
+ performs an efficient
+ skip by only moving through the delta stream, making restarts of stacked
+ deltas reasonably efficient.
+ curcmd == CMD_COPY
+ , position the base has to be at.
+ DeltaStream
+ may close and reopen the base stream multiple
+ times if copy instructions use offsets out of order. This can occur if a
+ large block in the file was moved from near the top, to near the bottom.
+ In such cases the reopened stream is skipped to the target offset, so
+ skip(long)
+ should be as efficient as possible.
+ PackWriter
+ uses this class to track the things it needs to include in
+ the newly generated pack file, and how to efficiently obtain the raw data for
+ each object as they are written to the output stream.
+ super.clearReuseAsIs()
+ to ensure the flag is
+ properly cleared for the writer.
+ setNeedSnapshot(true)
+ .
+ PackFile
+ s), and a half that is considered to be slow
+ to search (loose objects). When alternates are present the fast half is fully
+ searched (recursively through all alternates) before the slow half is
+ considered.
+ objects directory.
+ a list of alternate object directories
+
+ the file system abstraction which will be necessary to perform
+ certain file system operations.
+
+ objects directory..idx file listing the contents.
+ path of the .pack file holding the data.
+ pack-*.pack
+ pattern.
+ .idx file for reading..idx file for reading.
+
+ The format of the file will be automatically detected and a proper access
+ implementation for that format will be constructed and returned to the
+ caller. The file may or may not be held open by the returned instance.
+ + Iterator<MutableEntry> eItr = index.iterator(); + int curPosition = 0; + while (eItr.hasNext() && curPosition++ < nthPosition) + eItr.next(); + ObjectId result = eItr.next().toObjectId(); ++
+ Iterator<MutableEntry> eItr = index.iterator(); + int curPosition = 0; + while (eItr.hasNext() && curPosition++ < nthPosition) + eItr.next(); + ObjectId result = eItr.next().toObjectId(); ++
.idx suffix in a pack file pair)
+ provides random access to any object in the pack by associating an ObjectId
+ to the byte offset within the pack where the object's data can be read.
+ + writeFanOutTable(); + for (final PackedObjectInfo po : entries) + writeOneEntry(po); + writeChecksumFooter(); ++ + Where the logic for
writeOneEntry is specific to the index
+ format in use. Additional headers/footers may be used if necessary and
+ the
+ .keep file.
+ pack-*.pack file.
+ the filesystem abstraction used by the repository.
+ pack-*.keep file, with the given message.pack-*.keep file, with the given message..keep file that holds this pack in place..keep file that holds this pack in place.refs/
+ directory. The file name matches the reference name and the file contents is
+ the current
+ packed-refs
+ .
+ In the packed format, each reference is stored on its own line. This file
+ reduces the number of files needed for large reference spaces, reducing the
+ overall size of a Git repository on disk.
+ RefDatabase
+ .
+
+ This list is a hybrid of a Map<String,Ref> and of a List<Ref>. It
+ tracks reference instances by name by keeping them sorted and performing
+ binary search to locate an entry. Lookup time is O(log N), but addition and
+ removal is O(N + log N) due to the list expansion or contraction costs.
+
+ This list type is copy-on-write. Mutation methods return a new copy of the
+ list, leaving
+ this
+ unmodified. As a result we cannot easily implement
+ the
+ -(index + 1)
+ .
+ 0 <= idx < size()
+ .
+
+ n
+ elements.
+
+ Copies the first
+ n
+ elements from this list into a new builder,
+ which can be used by the caller to add additional elements.
+ n
+ elements already added.
+ idx
+ with
+ ref
+ .
+ ref
+ .
+ idx
+ .
+ refs/heads/foo
+ ,
+ which is a file, to
+ refs/heads/foo/bar
+ , which is stored inside a
+ directory that happens to match the source name.
+ (PackFile,position) key tuple.
+ This is ensured by an array of locks, with the tuple hashed to a lock
+ instance.
+
+ During a miss, older entries are evicted from the cache so long as
+ (PackFile,position) tuple.load() invocation there is exactly one
+ createRef() there will be
+ exactly one call to
+ pack of the object.
+ ObjectReader
+ implementations may also optionally implement this
+ interface to support
+ PackWriter
+ state structure for an object.
+
+ PackWriter
+ invokes this method to write out one or more objects,
+ in approximately the order specified by the iteration over the list. A
+ simple implementation of this method would just iterate the list and
+ output each object:
+ + for (ObjectToPack obj : list) + out.writeObject(obj) ++ However more sophisticated implementors may try to perform some (small) + reordering to access objects that are stored close to each other at + roughly the same time. Implementations may choose to write objects out of + order, but this may increase pack file size due to using a larger header + format to reach a delta base that is later in the stream. It may also + reduce data locality for the reader, slowing down data access. + Invoking +
this
+ if the current object is scheduled
+ for reuse.
+ PackWriter
+ invokes this method only if a representation
+ previously given to it by
+ selectObjectRepresentation
+ was chosen
+ for reuse into the output stream. The
+ otp
+ argument is an instance
+ created by this reader's own
+ newObjectToPack
+ , and the
+ representation data saved within it also originated from this reader.
+
+ Implementors must write the object header before copying the raw data to
+ the output stream. The typical implementation is like:
+ + MyToPack mtp = (MyToPack) otp; + byte[] raw; + if (validate) + raw = validate(mtp); // throw SORNAE here, if at all + else + raw = readFast(mtp); + out.writeHeader(mtp, mtp.inflatedSize); + out.write(raw); ++
out.writeHeader
+ the pack
+ writer will try to find another representation, and write
+ that one instead. If throw after
+ out.writeHeader
+ ,
+ packing will abort.
+ dstbuf to start copying into.
+
+ number of bytes to copy. This value may exceed the number of
+ bytes remaining in the window starting at offset
+ pos.
+
+ cnt if cnt exceeded the number of bytes
+ available.
+ position
+ .
+ dstbuf to inflate into.
+ dstoff based on the number of bytes
+ successfully inflated into dstbuf.
+ patch-delta.c in the
+ GIT project. The original delta patching code was written by Nicolas Pitre
+ (<nico@cam.org>).
+ result
+ , or the result array allocated.
+ text
+ to start copying from.
+
+ number of bytes to insert.
+ DeltaIndex
+ is thread-safe. Concurrent threads can use the same
+ index to encode delta instructions for different result buffers.
+ 1.75 * sourceLength
+ .
+ encode(out, res, 0)
+ .
+ res
+ . This stream
+ should be buffered, as instructions are written directly to it
+ in small bursts.
+
+
+ the desired result buffer. The generated instructions will
+ recreate this buffer when applied to the source buffer stored
+ within this index.
+
+ res
+ . This stream
+ should be buffered, as instructions are written directly to it
+ in small bursts. If the caller might need to discard the
+ instructions (such as when deltaSizeLimit would be exceeded)
+ the caller is responsible for discarding or rewinding the
+ stream when this method returns false.
+
+
+ the desired result buffer. The generated instructions will
+ recreate this buffer when applied to the source buffer stored
+ within this index.
+
+
+ maximum number of bytes that the delta instructions can
+ occupy. If the generated instructions would be longer than
+ this amount, this method returns false. If 0, there is no
+ limit on the length of delta created.
+
+ getTotalBytes() / (getTimeWriting() / 1000.0)
+ .
+ childPath where the child can
+ insert its data. The value at
+ childPath[childPathOffset-1] must be '/'.
+
+ java.io package to read the
+ specified working directory as part of a
+ java.io package. Plugins for a Java based IDE may however wish
+ to create their own implementations of this class to allow traversal of the
+ IDE's project space, as well as benefit from any caching the IDE may have.
+ true if the content matches, false
+ otherwise
+
+ new
+ File(getDirectory(), getEntryPath())
+
+ but may be faster by
+ reusing an internal File instance.
+ getObjectId(nthA).equals(getObjectId(nthB)).
+ startsWith or some other type of string
+ match function.
+ buf to test.
+ endsWith or some other type of
+ string match function.
+ buf to test.
+ AndTreeFilter or OrTreeFilter instances to
+ describe the boolean expression required by the application. Custom
+ filter implementations may also be constructed by applications.
+
+ Note that filters are not thread-safe and may not be shared by concurrent
+ TreeWalk instances. Every TreeWalk must be supplied its own unique
+ filter, unless the filter implementation specifically states it is (and
+ always will be) thread-safe. Callers may use
+ true if the current entry is covered by a
+ directory/file conflict, false otherwise
+ a.true
+ if the path length of this filter matches the length
+ of the current path of the supplied TreeWalk.
+ changeId
+ .
+ Boolean.TRUE to assume that Cygwin is used in
+ combination with jgitBoolean.FALSE to assume that Cygwin is
+ not used with jgitnull to auto-detect whether a Cygwin
+ installation is present on the system and in this case assume
+ that Cygwin is usednew File(dir,name) if this
+ platform does not require path name translation.
+ this
+ .
+ this
+ val if
+ the list is currently empty.
+
+ value to insert into padded positions.
+ value
+ appears in this list.
+ val if
+ the list is currently empty.
+
+ value to insert into padded positions.
+ $ or ~ from
+ being recognized as special.
+ ~user at the start of the string.
+ ~user at the start of the string.
+ + a.equals(dequote(quote(a))); ++ is true for any
a.
+ + a.equals(dequote(Constants.encode(quote(a)))); ++ is true for any
a.
+
+ This method removes any opening/closing quotation marks added by
+ in to scan.
+ one position past in in to scan.
+ $ or ~ from
+ being recognized as special.
+ ~user at the start of the string.
+ ~user at the start of the string.
+ o-1 and ends at o-1-digits, where
+ digits is the number of positions necessary to store the
+ base 10 value.
+
+ The argument and return values from this method make it easy to chain
+ writing, for example:
+ + final byte[] tmp = new byte[64]; + int ptr = tmp.length; + tmp[--ptr] = '\n'; + ptr = RawParseUtils.formatBase10(tmp, ptr, 32); + tmp[--ptr] = ' '; + ptr = RawParseUtils.formatBase10(tmp, ptr, 18); + tmp[--ptr] = 0; + final String str = new String(tmp, ptr, tmp.length - ptr); ++
o. This is the position of
+ the last byte written. Additional writing should start at one
+ position earlier.
+ [p, p+4)
+ will
+ be parsed.
+
+ first position within the buffer to parse.
+ [p, p+8)
+ will
+ be parsed.
+
+ first position within the buffer to parse.
+ [ptr, end) to find line starts.[ptr, end) to find line starts.
+
+ The returned list is 1 indexed. Index 0 contains
+ list.get(1) (aka get line 1) returns
+ ptr.
+
+ The last element (index map.size()-1) always contains
+ end.
+ buf.
+ nameB callers should use the
+ return value of
+ nameB callers should use the
+ return value of
+ raw[ptr]
+ matches
+ ^[A-Za-z0-9-]+:
+ (e.g.
+ "Signed-off-by: A. U. Thor\n") then this method returns the position of
+ the first ':'.
+
+ If the region at
+ raw[ptr]
+ does not match
+ ^[A-Za-z0-9-]+:
+ then this method returns -1.
+ [start,end),
+ after decoding the region through the specified character set.
+ [start,end),
+ after decoding the region through the specified character set.
+ [start,end),
+ after decoding the region through the specified character set.
+ [start,end),
+ after decoding the region through the specified character set.
+ [start,end),
+ after decoding the region through the specified character set.
+ [start,end).b.length if no paragraph end could be located.
+ rcs of the first occurrence of this
+ pattern; -1 if this pattern does not appear at any position of
+ rcs.
+ 0 <= idx < size()
+ .
+
+ src
+ to start copying from.
+
+
+ number of items to copy from
+ src
+ .
+
+ RefDatabase
+ namespace.
+
+ Although not declared as a
+ RefDatabase
+ , which
+ needs to perform a merge-join of three sorted
+ loose
+ , otherwise it might be omitted by the map.
+ ""
+ (the empty string) to select
+ all list items.
+
+
+ items from the packed reference list, this is the last list
+ searched.
+
+
+ items from the loose reference list, this list overrides
+ packed
+ if a name appears in both.
+
+
+ resolved symbolic references. This list overrides the prior
+ list
+ loose
+ , if an item appears in both. Items in this
+ list must also appear in
+ loose
+ .
+
+ value
+ .
+ value
+ is not recognized as one of the standard
+ boolean names.
+ yes
+ ,
+ true
+ ,
+ 1
+ ,
+ on
+ can all be
+ used to mean
+ true
+ .
+
+ The terms
+ no
+ ,
+ false
+ ,
+ 0
+ ,
+ off
+ can all be
+ used to mean
+ false
+ .
+
+ Comparisons ignore case, via
+ value
+ or null in case the
+ string does not represent a boolean value
+ true if the string is null or empty
+ Length()
+ /1024.
+
+
+ private InterruptTimer myTimer = ...;
+ void foo() {
+ try {
+ myTimer.begin(timeout);
+ // work
+ } finally {
+ myTimer.end();
+ }
+ }
+
+
+ An InterruptTimer is not recursive. To implement recursive timers,
+ independent InterruptTimer instances are required. A single InterruptTimer
+ may be shared between objects which won't recursively call each other.
+
+ Each InterruptTimer spawns one background thread to sleep the specified time
+ and interrupt the thread which called
+ toString()
+ tries to work out a reasonably correct character set for the raw data.
+ true
+ then all read methods will signal EOF
+ by returning -1, until another InputStream has been pushed into the queue
+ with
+ scheme "://" user_password? hostname? portnumber? path
+ | Path | +Humanish part | +
|---|---|
/path/to/repo.git |
+ repo |
+
/path/to/repo.git/ |
+ |
/path/to/repo/.git |
+ |
/path/to/repo/ |
+ |
/path//to |
+ an empty string | +
null
+ .
+ null
+ or empty
+ null if the merge-result was produced without
+ computing a common base
+
+ all the commits which have been merged together
+ the status the merge resulted in
+
+ the used
+ null if the merge-result was produced without
+ computing a common base
+
+ all the commits which have been merged together
+ the status the merge resulted in
+
+ the used
+ null if the merge-result was produced without
+ computing a common base
+
+ all the commits which have been merged together
+ the status the merge resulted in
+
+ the used
+ null if the merge-result was produced without
+ computing a common base
+ MergeResult m=...;
+ Map<String, int[][]> allConflicts = m.getConflicts();
+ for (String path : allConflicts.keySet()) {
+ int[][] c = allConflicts.get(path);
+ System.out.println("Conflicts in file " + path);
+ for (int i = 0; i < c.length; ++i) {
+ System.out.println(" Conflict #" + i);
+ for (int j = 0; j < (c[i].length) - 1; ++j) {
+ if (c[i][j] >= 0)
+ System.out.println(" Chunk for "
+ + m.getMergedCommits()[j] + " starts on line #"
+ + c[i][j]);
+ }
+ }
+ }
+ null if no conflict occurrednull
+ if no failure occurred
+ position() == 0
+ and
+ limit()
+ equal to the actual length read. Callers may rely
+ on obtaining the underlying array for efficient data access. If
+ sizeHint
+ was too large, the array may be over-allocated,
+ resulting in
+ limit() < array().length
+ .
+ refs/head/masterrefs/head/master:refs/remotes/origin/masterrefs/head/*:refs/remotes/origin/*+refs/head/master+refs/head/master:refs/remotes/origin/master+refs/head/*:refs/remotes/origin/*:refs/head/masterrefs/tags/v1.0^{}) use the base name (without
+ the ^{} suffix) and look at the peeled object id.
+ toString()
+ method should be overridden to return the
+ complete contents.
+
+ git-upload-pack
+ service running where the remote repository is stored. This provides a
+ one-way object transfer service to copy objects from the remote repository
+ into this local repository.
+
+ Instances of a FetchConnection must be created by a
+ local
+ ; otherwise null.
+
+ refs/tags/v1.0^{}) use the base name (without
+ the ^{} suffix) and look at the peeled object id.
+ git-receive-pack
+ service running where the remote repository is stored. This provides a
+ one-way object transfer service to copy objects from the local repository
+ into the remote repository, as well as a way to modify the refs stored by the
+ remote repository.
+
+ Instances of a PushConnection must be created by a
+ true
+ , this connection
+ can be tunneled over a request-response style RPC system like HTTP. The RPC
+ call boundary is determined by this class switching from writing to the
+ OutputStream to reading from the InputStream.
+
+ Concrete implementations should just call
+ include
+ calls to reflect which objects should be available as refs in the bundle for
+ the other side to fetch. At least one include is required to create a valid
+ bundle file, and duplicate names are not permitted.
+
+ Optional assume calls can be made to declare commits which the
+ recipient must have in order to fetch from the bundle file. Objects reachable
+ from these assumed commits can be used as delta bases in order to reduce the
+ overall bundle size.
+ include(r.getName(), r.getObjectId()).
+ receive.denyDenyDeletesreceive.denyNonFastForwardstrue
+ to enable the additional check.
+
+ null
+
+ the reporter for sending the status strings.
+ Map
+ of refs before it is advertised to the client.
+ $tag^{} ; false to omit it from the output.
+
+ .have
+ .
+
+ The magic
+ .have
+ advertisement is not available for fetching by a
+ client, but can be used by a client when considering a delta base
+ candidate before transferring data in a push. Within the record created
+ by this method the ref name is simply the invalid string
+ .have
+ .
+
+ package com.example.my_transport;
+ class MyTransport extends Transport {
+ public static final TransportProtocol PROTO = new TransportProtocol() {
+ public String getName() {
+ return "My Protocol";
+ }
+ };
+ }
+
+
+ Applications may register additional protocols for use by JGit by calling
+ META-INF/services/org.eclipse.jgit.transport.Transport
+ . For each
+ class name listed in the services file, any static fields of type
+ TransportProtocol
+ will be automatically registered. For the above
+ example the string
+ com.example.my_transport.MyTransport
+ should be
+ listed in the file, as that is the name of the class that defines the static
+ PROTO singleton.
+ local.getConfig()
+ using
+ remoteName
+ if the name
+ is non-null.
+
+ The default implementation of this method matches the scheme against
+ local.getConfig()
+ using
+ remoteName
+ if the name
+ is non-null.
+
+ The default implementation of this method matches the scheme against
+ local
+ ; otherwise null.
+
+ local.getConfig()
+ using the remote block named by the
+ remoteName
+ , if the name is non-null.
+ local
+ ; otherwise null.
+
+ objects/ subdirectory of a single remote Git repository or
+ naked object database and make the content available as a Java input stream
+ for reading during fetch. The actual object traversal logic to determine the
+ names of files to retrieve is handled through the generic, protocol
+ independent
+ pack-035760ab452d6eebd123add421f253ce7682355a.pack. Index
+ names should not be included in the returned collection.
+ cb/95df6ab7ae9e57571511ef451cf33767c26dd2 or
+ pack/pack-035760ab452d6eebd123add421f253ce7682355a.pack).
+
+ ../ to request deletion of a file that
+ resides in the repository itself.
+
+ When possible empty directories must be removed, up to but not including
+ the current object database directory itself.
+
+ This method does not support deletion of directories.
+ ../ to request writing of a file that
+ resides in the repository itself.
+
+ The requested path may or may not exist. If the path already exists as a
+ file the file should be truncated and completely replaced.
+
+ This method creates any missing parent directories, if necessary.
+ ../ to request writing of a file that
+ resides in the repository itself.
+
+ The requested path may or may not exist. If the path already exists as a
+ file the file should be truncated and completely replaced.
+
+ This method creates any missing parent directories, if necessary.
+ refs/heads/pu.
+
+ refs/heads/pu.
+
+ refs/heads/pu.
+
+ new value to store in this ref. Must not be null.
+ pack-035760ab452d6eebd123add421f253ce7682355a.pack.
+
+ info/packs).
+
+ objects/info/alternates
+ or objects/info/http-alternates within a Git repository.
+
+ Alternates appear one per line, with paths expressed relative to this
+ object database.
+ info/alternates).
+
+ i.
+
+ git:// transport protocol.git:// transport protocol.git://.
+ daemon.servicename config setting.
+
+ git:// protocol, usually run on
+ the IANA registered port 9418. It is a popular means for distributing open
+ source projects, as there are no authentication or authorization overheads.
+ true
+ (default), smart HTTP is enabled.
+
+ GET
+ HTTP method.
+ POST
+ HTTP method.
+ Cache-Control
+ header.
+ Pragma
+ header.
+ User-Agent
+ header.
+ Date
+ header.
+ Expires
+ header.
+ ETag
+ header.
+ If-None-Match
+ header.
+ Last-Modified
+ header.
+ If-Modified-Since
+ header.
+ Accept
+ header.
+ Content-Type
+ header.
+ Content-Length
+ header.
+ Content-Encoding
+ header.
+ Content-Range
+ header.
+ Accept-Ranges
+ header.
+ If-Range
+ header.
+ Range
+ header.
+ Accept-Encoding
+ header.
+ gzip
+ encoding value for
+ text/plain
+ MIME type.
+ Authorization
+ header.
+ WWW-Authenticate
+ header.
+ c.getResponseCode() but the
+ ConnectException is translated to be more understandable.
+ "git-upload-pack" or "git upload-pack", this
+ implementation will fork and execute the external process, using an operating
+ system pipe to transfer data.
+
+ Similarly, during
+ "git-receive-pack" or "git receive-pack", this
+ implementation will fork and execute the external process, using an operating
+ system pipe to transfer data.
+ $HOME/.ssh.$HOME/.ssh.
+
+ This is the default implementation used by JGit and provides most of the
+ compatibility necessary to match OpenSSH, a popular implementation of SSH
+ used by C Git.
+
+ If user interactivity is required by SSH (e.g. to obtain a password), the
+ connection will immediately fail.
+ $HOME/.ssh.
+ $HOME/.ssh.
+
+ This is the default implementation used by JGit and provides most of the
+ compatibility necessary to match OpenSSH, a popular implementation of SSH
+ used by C Git.
+
+ The factory does not provide UI behavior. Override the method
+ $HOME/.ssh and assume OpenSSH compatibility.
+ connect()
+ if it has not already been connected.
+ objects/info/packs or info/refs files on the
+ remote repository and access the data directly, much as Git itself would.
+
+ Concurrent pushing over this transport is not supported. Multiple concurrent
+ push operations may cause confusion in the repository state.
+ a
+ with itself (by passing
+ a
+ again in position
+ b
+ ).
+ ai
+ to compare.
+
+ the second sequence.
+
+ item of
+ bi
+ to compare.
+
+ equals()
+ method.
+ e
+ is reduced in size by moving the beginning A
+ and B points so the edit does not cover any items that are in common
+ between the two sequences. The ending A and B points are also shifted to
+ remove common items from the end of the region.
+ e
+ if it was updated in-place, otherwise a new edit
+ containing the reduced region.
+ ptr
+ ,
+ next[ptr - ptrShift]
+ has subsequent index.
+ For the sequence element
+ ptr
+ , the value stored at location
+ next[ptr - ptrShift]
+ is the next occurrence of the exact same
+ element in the sequence.
+ Chains always run from the lowest index to the largest index. Therefore
+ the array will store
+ next[1] = 2
+ , but never
+ next[2] = 1
+ .
+ This allows a chain to terminate with
+ 0
+ , as
+ 0
+ would never
+ be a valid next element.
+ The array is sized to be
+ region.getLengthA()
+ and element indexes
+ are converted to array indexes by subtracting
+ region.beginA
+ .
+ ptr
+ in A, index of the record in
+ recs[recIdx[ptr - ptrShift]]
+ is the record
+ describing all occurrences of the element appearing in sequence A at
+ position
+ ptr
+ . The record is needed to get the occurrence count of
+ the element, or to locate all other occurrences of that element within
+ sequence A. This index provides constant-time access to the record, and
+ avoids needing to scan the hash chain.
+ [ptr, end) of raw.begin
+ to them. Sequences of this type
+ must be used with a
+ a
+ to create a subsequence around.
+
+ base
+ as described by A in
+ region
+ .
+ b
+ to create a subsequence around.
+
+ base
+ as described by B in
+ region
+ .
+ edits
+ (as the list was updated in-place).
+ end - begin
+ .
+ base
+ that will be part of this
+ new subsequence. The element at
+ begin
+ will be this
+ sequence's element 0.
+
+
+ One past the last element index of
+ base
+ that will be
+ part of this new subsequence.
+
+ Fetch
+ command. It has setters for all
+ supported options and arguments of this command and a
+ this
+ this
+ this
+ this
+
+ this
+ this
+ command
+ this
+ fetch
+ command with all the options and parameters
+ collected by the setter methods of this class. Each instance of this
+ class should only be used for one invocation of the command (means: one
+ call to
+ Constants.DEFAULT_REMOTE_NAME will
+ be used.
+ this
+ this
+ this
+ NullProgressMonitor
+ this
+ this
+ this
+ this
+ this
+ this
+ Push
+ command. It has setters for all
+ supported options and arguments of this command and a
+ push
+ command with all the options and parameters
+ collected by the setter methods of this class. Each instance of this
+ class should only be used for one invocation of the command (means: one
+ call to
+ Constants.DEFAULT_REMOTE_NAME will
+ be used.
+ this
+ RemoteConfig.DEFAULT_RECEIVE_PACK will be used.
+ this
+ NullProgressMonitor
+ this
+ this
+ this
+ this
+ .
+ this
+ .
+ this
+ this
+ this
+ Pull
+ command with all the options and parameters
+ collected by the setter methods (e.g.
+ nullnullnullnull
+ null or otherwise
+ invalid
+ true and the branch with the given name
+ already exists, the start-point of an existing branch will be
+ set to a new start-point; if false, the existing branch will
+ not be changed
+
+ null,
+ the current HEAD will be used
+
+ null,
+ the current HEAD will be used
+
+ null
+
+ true corresponds to the -D option,
+ false to the -d option (default) false a check will be performed whether the
+ branch to be deleted is already merged into the current branch
+ and deletion will be refused in this case
+
+ null or otherwise
+ invalid
+ HEAD
+ reference
+ cherry-pick
+ command. It has setters for all
+ supported options and arguments of this command and a
+ Cherry-Pick
+ command with all the options and
+ parameters collected by the setter methods (e.g.
+ this
+ this
+ this
+ this
+ id
+ .
+
+ the ObjectId to store in this entry.
+ id
+ .
+
+ the ObjectId to store in this entry.
+ nameBuf
+ of the name data.
+
+
+ number of bytes from
+ nameBuf
+ to use as the name.
+
+
+ mode describing the treatment of
+ id
+ .
+
+ the ObjectId to store in this entry.
+ nameBuf
+ of the name data.
+
+
+ number of bytes from
+ nameBuf
+ to use as the name.
+
+
+ mode describing the treatment of
+ id
+ .
+
+ buffer holding the raw ObjectId of the entry.
+
+ first position within
+ idBuf
+ to copy the id from.
+
+ clear()
+ until the value is no longer necessary.
+ true
+ if the provider is interactive with the end-user.
+ true
+ if this
+ true
+ if the request was successful and values were
+ supplied;
+ false
+ if the user canceled the request and did
+ not supply all requested values.
+ true
+ if the request was successful and values were
+ supplied;
+ false
+ if the user canceled the request and did
+ not supply all requested values.
+ prefixLen == 0
+ , and thus does not skip any digits.
+ For ObjectId "c0ffee...", the note (if it exists) will be stored within the
+ bucket
+ table[0xc0]
+ .
+ The first level tree has
+ prefixLen == 2
+ , and thus skips the first two
+ digits. For the same example "c0ffee..." object, its note would be found
+ within the
+ table[0xff]
+ bucket (as first 2 digits "c0" are skipped).
+ Each subtree is loaded on-demand, reducing startup latency for reads that
+ only need to examine a few objects. However, due to the rather uniform
+ distribution of the SHA-1 hash that is used for ObjectIds, accessing 256
+ objects is very likely to load all of the subtrees into memory.
+ A FanoutBucket must be parsed from a tree object by
+ table[ objectId.getByte( prefixLen / 2 ) ]
+ . If the slot is null
+ there are no notes with that prefix.
+ noteOn
+ .
+ ObjectReader
+ at the proper times.
+ + ObjectId dataId = thisMap.get(id); + if (dataId != null) + reader.open(dataId).openStream(); ++
id
+ , the note content. If no note
+ is defined, null.
+ sizeLimit
+ .
+ noteData
+ .
+
+
+ data to associate with the note. This must be the ObjectId of
+ a blob that already exists in the repository. If null the note
+ will be deleted, if present.
+
+ noteData
+ .
+
+
+ text to store in the note. The text will be UTF-8 encoded when
+ stored in the repository. If null the note will be deleted, if
+ the empty string a note with the empty string will be stored.
+
+
+ inserter to write the encoded
+ noteData
+ out as a blob.
+ The caller must ensure the inserter is flushed before the
+ updated note map is made available for reading.
+
+ prefix.length() == 0
+ , the first-level
+ subtrees should be
+ prefix.length()==2
+ , etc.
+
+ the tree to read from the repository.
+ reader to access the tree object.
+ treeId
+ cannot be accessed.
+ Rebase
+ command. It has setters for all
+ supported options and arguments of this command and a
+ Rebase
+ command with all the options and parameters
+ collected by the setter methods of this class. Each instance of this
+ class should only be used for one invocation of the command. Don't call
+ this method twice on an instance.
+ git-rebase-todo file but preserves comments and other lines
+ that can not be parsed as steps
+ this
+ this
+ this
+ this
+ this
+ RebaseResult with status
+ RebaseResult with status
+ null
+ null
+ Rm
+ command. It has setters for all
+ supported options and arguments of this command and a
+ this
+ Rm
+ command. Each instance of this class should only
+ be used for one invocation of the command. Don't call this method twice
+ on an instance.
+ git is a
+
+ git.checkout().setName("feature").call();
+
+
+ Check out paths from the index:
+
+ git.checkout().addPath("file1.txt").addPath("file2.txt").call();
+
+
+ Check out a path from a commit:
+
+ git.checkout().setStartPoint("HEADˆ").addPath("file1.txt").call();
+
+
+ Create a new branch and check it out:
+
+ git.checkout().setCreateBranch(true).setName("newbranch").call();
+
+
+ Create a new tracking branch for a remote branch and check it out:
+
+ git.checkout().setCreateBranch(true).setName("stable")
+ .setUpstreamMode(SetupUpstreamMode.SET_UPSTREAM)
+ .setStartPoint("origin/stable").call();
+
+ null or otherwise
+ invalid
+ this
+ true to checkout all paths, false
+ otherwise
+
+ this
+ true, use
+ this method to set the name of the new branch to create and
+ true is used, the name of the new branch must be set
+ using
+ true a branch will be created as part of the
+ checkout and set to the specified start point
+
+ true and the branch with the given name
+ already exists, the start-point of an existing branch will be
+ set to a new start-point; if false, the existing branch will
+ not be changed
+
+ null,
+ the index is used.
+
+ When creating a new branch, this will be used as the start point. If not
+ specified or null, the current HEAD is used.
+ null, the current HEAD is used.
+
+ When checking out files and this is not specified or null,
+ the index is used.
+ null
+
+ nullInit
+ command.
+ Git
+ object with associated repository
+ File
+ File
+ File
+ to be deleted
+
+ f
+ fails. This may occur if
+ f
+ didn't exist when the method was called. This can therefore
+ cause IOExceptions during race conditions when multiple
+ concurrent threads all try to delete the same file.
+ File
+ to be deleted
+
+
+ deletion options,
+ RECURSIVE
+ for recursive deletion of
+ a subtree,
+ RETRY
+ to retry when deletion failed.
+ Retrying may help if the underlying file system doesn't allow
+ deletion of files being read by another thread.
+
+ f
+ fails. This may occur if
+ f
+ didn't exist when the method was called. This can therefore
+ cause IOExceptions during race conditions when multiple
+ concurrent threads all try to delete the same file. This
+ exception is not thrown when IGNORE_ERRORS is set.
+ d
+ fails. This may occur if
+ d
+ did exist when the method was called. This can therefore
+ cause IOExceptions during race conditions when multiple
+ concurrent threads all try to create the same directory.
+ true
+ skip creation of the given directory if it
+ already exists in the file system
+
+ d
+ fails. This may occur if
+ d
+ did exist when the method was called. This can therefore
+ cause IOExceptions during race conditions when multiple
+ concurrent threads all try to create the same directory.
+ d
+ fails. This may occur if
+ d
+ did exist when the method was called. This can therefore
+ cause IOExceptions during race conditions when multiple
+ concurrent threads all try to create the same directory.
+ true
+ skip creation of the given directory if it
+ already exists in the file system
+
+ d
+ fails. This may occur if
+ d
+ did exist when the method was called. This can therefore
+ cause IOExceptions during race conditions when multiple
+ concurrent threads all try to create the same directory.
+
+ if (snapshot.isModified(path)) {
+ FileSnapshot other = FileSnapshot.save(path);
+ Content newContent = ...;
+ if (oldContent.equals(newContent) && snapshot.equals(other))
+ snapshot.setClean(other);
+ }
+
+ fileList is a list of conflicting files, if status is
+ fileList is a list of not deleted
+ files. All other values ignore fileList. To create a result
+ for
+ revert
+ command. It has setters for all
+ supported options and arguments of this command and a
+ revert
+ command with all the options and parameters
+ collected by the setter methods (e.g.
+ null
+ is returned. The list of successfully reverted
+ this
+ this
+ this
+ null but maybe an empty list if no commit was
+ successfully cherry-picked
+ null if no merge
+ failure occurred during the revert
+ on*()
+ event methods declared
+ to be abstract.
+ buf[0]
+ .
+ entries
+ by copying already existing objects from the
+ repository onto the end of the thin pack to make it self-contained.
+ true
+ allows the
+ caller to use
+ true
+ to enable keeping track of new objects.
+
+ true
+ will allow the caller to use
+ true
+ to enable keeping track of delta bases.
+
+ + setObjectChecker(on ? new ObjectChecker() : null); ++
info
+ , after populating.
+ onBegin()
+ events. The entire header is
+ supplied in a single invocation, before any object data is supplied.
+ info
+ should be included in the object list
+ returned by
+ info
+ object.
+ info
+ object.
+ dst
+ to start copying data into.
+
+
+ ideal target number of bytes to read. Actual read length may
+ be shorter.
+
+
+ baseStreamPosition
+ < deltaStreamPosition
+
+ . This is not the position
+ returned by a prior end object event.
+
+
+ size of the delta when fully inflated. The size stored within
+ the pack may be larger or smaller, and is not yet known.
+
+ + ObjectWalk walk = new ObjectWalk(repository); + walk.markStart(walk.parseCommit(listName)); + RevCommit commit; + while ((commit = walk.next()) != null) + list.addCommit(commit); + RevObject object; + while ((object == walk.nextObject()) != null) + list.addObject(object, walk.getPathHasCode()); ++ +
Clone
+ command.
+ Git
+ object with associated repository
+ Constants.DEFAULT_REMOTE_NAME will be used.
+ NullProgressMonitor
+ this
+ this
+ this
+ this
+ true no branch will be checked out
+ after the clone. This enhances performance of the clone
+ command when there is no need for a checked out branch.
+
+ this
+ rep
+ only and using its internal state to decide if this object is within this
+ pack. Implementors should ensure a representation from this cached pack
+ is tested as part of
+ git-daemon-export-ok
+ files.
+
+ git-daemon-export-ok is required to export
+ a repository; true if git-daemon-export-ok is
+ ignored.
+ git-daemon-export-ok file to be accessed through this
+ daemon.
+
+ If true, all repositories are available through the daemon, whether or
+ not git-daemon-export-ok exists.
+ git-daemon-export-ok is
+ ignored by this method. The repository is always published.
+ git-daemon-export-ok will be published.
+
+ git-daemon-export-ok
+ file
+ is present in the repository's directory.
+ Reset
+ command. It has setters for all
+ supported options and arguments of this command and a
+ Reset
+ command. Each instance of this class should
+ only be used for one invocation of the command. Don't call this method
+ twice on an instance.
+ ArrayList
+ , adding or removing from any position except the
+ end of the list requires O(N) time to copy all elements between the
+ modification point and the end of the list. Applications are strongly
+ encouraged to not use this access pattern with this list implementation.
+ 2^bits-1
+ .
+ newValue
+ , but only if there is not already an object for
+ the same object name. Callers can tell if the value is new by checking
+ the return value with reference equality:
+ + V obj = ...; + boolean wasNew = map.addIfAbsent(obj) == obj; ++
newValue
+ if stored, or the prior value already stored and
+ that would have been returned had the caller used
+ get(newValue)
+ first.
+ Ref's
+
+ CherryPickResult with status
+ null if
+ Ref's,
+ null if
+ null if
+ Status
+ command. It has setters for all
+ supported options and arguments of this command and a
+ Status
+ command with all the options and parameters
+ collected by the setter methods of this class. Each instance of this
+ class should only be used for one invocation of the command. Don't call
+ this method twice on an instance.
+ this
+ this
+ this
+ this
+ this
+ this
+ this
+ this
+ this
+ Constants.DEFAULT_REMOTE_NAME will
+ be used.
+ this
+ this
+ this
+ this
+ LsRemote
+ command with all the options and parameters
+ collected by the setter methods (e.g.
+ git log --relative-date
+ .
+ git log --relative-date
+ git log --follow
+ in the C
+ implementation). This is not the same as copy/move detection as
+ implemented by the C implementation's of
+ git blame -M -C
+ .
+ this
+ this
+ this
+ clean
+ command with all the options and parameters
+ collected by the setter methods of this class. Each instance of this
+ class should only be used for one invocation of the command (means: one
+ call to
+ this
+ this
+ this
+ this
+ git log --follow
+ in the C
+ implementation). This is not the same as copy/move detection as
+ implemented by the C implementation's of
+ git blame -M -C
+ .
+ this
+ setFollowFileRenames(true)
+ .
+ this
+ this
+ this
+ start..end
+ (end being more recent
+ than start) and then performs the equivalent operation as
+ start
+ walking forwards through history until
+ end
+ blaming line deletions.
+
+ A reverse blame may produce multiple sources for the same result line,
+ each of these is a descendant commit that removed the line, typically
+ this occurs when the same deletion appears in multiple side branches such
+ as due to a cherry-pick. Applications relying on reverse should use
+ this
+ start..end
+ (end being more recent
+ than start) and then performs the equivalent operation as
+ start
+ walking forwards through history until
+ end
+ blaming line deletions.
+
+ A reverse blame may produce multiple sources for the same result line,
+ each of these is a descendant commit that removed the line, typically
+ this occurs when the same deletion appears in multiple side branches such
+ as due to a cherry-pick. Applications relying on reverse should use
+ this
+ getResultEnd() - getResultStart()
+ , but also
+ getSourceEnd() - getSourceStart()
+ .
+ idx
+ . May be null.
+ idx
+ . May be null.
+ idx
+ . May be null.
+ idx
+ .
+ d
+ elements.
+ Diff
+ command with all the options and parameters
+ collected by the setter methods (e.g.
+ NullProgressMonitor
+ this
+ NullProgressMonitor
+ NullProgressMonitor
+ .gitmodules
+ file is read from the index.
+ .gitmodules
+ .
+
+ The root tree is not read until the first submodule is encountered by the
+ walk.
+
+ This method need only be called if constructing a walk manually instead of
+ with one of the static factory methods above.
+ .gitmodules
+ .
+
+ The root tree is not read until the first submodule is encountered by the
+ walk.
+
+ This method need only be called if constructing a walk manually instead of
+ with one of the static factory methods above.
+ .gitmodules
+ .
+
+ Uses the root tree if
+ start
+ until a commit that is reachable from end is encountered.
+ start
+ until a commit that is reachable from end is encountered. In
+ other words, count the number of commits that are in start,
+ but not in end.
+
+ Note that this method calls
+ start until a commit
+ that is reachable from end is encountered.
+ start until a commit
+ that is reachable from end is encountered. In other words,
+ Find of commits that are in start, but not in
+ end.
+
+ Note that this method calls
+ null if it could
+ not be determined
+ null
+ if it could
+ not be determined. If you also want local tracked branches use
+ branchName in
+ repository.
+ branchName in
+ repository.
+ ApplyCommand
+ command with all the options and
+ parameters collected by the setter methods (e.g.
+ this
+ this
+ this
+ this
+ this
+ this
+ this
+ this
+ .
+ this
+ .
+ true
+ if the ref log message should show the result.
+ this
+ .
+ this
+ .
+ this
+ .
+ this
+ .
+ this
+ .
+ null as progress monitor will be used.
+ true if we should ignore the fact that a certain
+ pack files or index files couldn't be deleted.
+ false if an exception should be thrown in such
+ cases
+
+ ignoreErrors is set to false
+ expireAgeMillis milliseconds
+ will not be pruned.
+ expireAgeMillis milliseconds
+ will not be pruned. Only older objects may be pruned. If set to 0 then
+ every object is a candidate for pruning.
+ expire will not be pruned.
+ expire will not be pruned.
+ Only older objects may be pruned. If set to null then every object is a
+ candidate for pruning.
+ null then the current time will be used
+ instead.
+
+ name and value are needed to be passed
+ to the remote in your faivorite encoding,use
+