beginA == endA && beginB > endB is an insert edit,
that is sequence B inserted the elements in region
[beginB, endB) at beginA.
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).
[0, ), like a standard Java List implementation.
Unlike a List, the members of the sequence are not directly obtainable, but
element equality can be tested if two Sequences are the same implementation.
equals(thisIdx,other,otherIdx)
returns the same as other.equals(otherIdx,this,thisIdx).
this sequence; must be in the range
[ 0, this.size() ).
Another sequence; must be the same implementation class, that
is this.getClass() == other.getClass().
Index within other sequence; must be in the range
[ 0, other.size() ).
[ptr, end) of raw.
.git/index file) to the tree structure
used by a 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 '/'.
this,
otherwise the caller would not be able to exit out of the subtree
iterator correctly and return to continue walking this.
@param repo
repository to load the tree data from.
@return a new parser that walks over the current subtree.
@throws IncorrectObjectTypeException
the current entry is not actually a tree and cannot be parsed
as though it were a tree.
@throws IOException
a loose object or pack file could not be Read.
this, otherwise
the caller would not be able to exit out of the subtree iterator
correctly and return to continue walking this.
@param repo
repository to load the tree data from.
@param idBuffer
temporary ObjectId buffer for use by this method.
@param curs
window cursor to use during repository access.
@return a new parser that walks over the current subtree.
@throws IncorrectObjectTypeException
the current entry is not actually a tree and cannot be parsed
as though it were a tree.
@throws IOException
a loose object or pack file could not be Read.
back(1)
would be an invalid request as there is no entry before the current one.
first() && eof().
@return true if the iterator is positioned on the first entry.
seek(1) but is called by
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.
+ 1
representing the old revision character sets and the new
revision character set.
index.
index.
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.
/dev/null/dev/nullend - ptr.
abbreviate(repo, 8).
this if this instance is an unsubclassed
instance of {@link ObjectId}; otherwise a new instance is returned
holding the same value.
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.
base.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.
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.
since
and before or equal a given date/time until.
a.
a.
a.
Signed-off-by
Acked-by
CC
code key.Name.Equals(Key, StringComparison.InvariantCultureIgnoreCase)).
refs/tags/v1.0^{}) use the base name (without
the ^{} suffix) and look at the peeled object id.
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.
Only one call per connection is allowed. Subsequent calls will result in
.config, .gitconfig, .gitmodules file.
[section "subsection"]
name = value
[section "subsection"]
name = value
[section "subsection"]
name = value
[section "subsection"]
name = value
[section "subsection"]
name = value
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.
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.
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()).
git:// transport protocol.
git-daemon-export-ok is
ignored by this method. The repository is always published.
git-daemon-export-ok will be published.
$HOME/.ssh.
$HOME/.ssh.
$HOME/.ssh and assume OpenSSH compatibility.
connect()
if it has not already been connected.
System.getProperty("user.name").
optional user account password or passphrase. If not null a
UserInfo that supplies this value to the SSH library will be
configured.
hostname (or IP address) to connect to. Must not be null.
port number the server is listening for connections on. May be <=
0 to indicate the IANA registered port of 22 should be used.
refs/tags/v1.0^{}) use the base name (without
the ^{} suffix) and look at the peeled object id.
objects directory. To use the
data contained within them call
setObjectChecker(on ? new ObjectChecker() : null);
receive.denyDenyDeletesreceive.denyNonFastForwardsHEAD and cannot be permitted.
true to enable keeping track of delta bases.
true to enable keeping track of new objects.
$tag^{} ; false to omit it from the output.
.have.
.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.
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/mastergit:// 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.
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.
../ to request writing of a file that
resides in the repository itself.
../ to request writing of a file that
resides in the repository itself.
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.
info/alternates).
a.
[ -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.
AndTreeFilter or OrTreeFilter instances to
describe the bool expression required by the application. Custom
filter implementations may also be constructed by applications.
getObjectId(nthA).Equals(getObjectId(nthB)).
@see #getObjectId(int)
startsWith or some other type of string
match function.
@param p
path buffer to test. Callers should ensure the path does not
end with '/' prior to invocation.
@param pLen
number of bytes from buf to test.
@return < 0 if p is before the current path; 0 if p matches the current
path; 1 if the current path is past p and p will never match
again on this tree walk.
endsWith or some other type of
string match function.
@param p
path buffer to test.
@param pLen
number of bytes from buf to test.
@return true if p is suffix of the current path;
false if otherwise
Stream originalStream = GetStream();
StreamReader reader = new StreamReader(new TimeoutStream(originalStream, 5000));
// assuming the originalStream has a per-operation timeout, then ReadToEnd()
// will return in (5000 + THAT_TIMEOUT)
string foo = reader.ReadToEnd();
new File(dir,name) if this
platform does not require path name translation.
new File(dir,name) if this
platform does not require path name translation.
val if the list is currently empty.
value to insert into padded positions.
val if
the list is currently empty.
@param val
value to insert into padded positions.
$ or ~ from
being recognized as special.
~user at the start of the string.
a.
a.
$ or ~ from
being recognized as special.
~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.
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.
list.get(1) (aka get line 1) returns
ptr.
map.size()-1) always contains
end.
@param buf
buffer to scan.
@param ptr
position within the buffer corresponding to the first byte of
line 1.
@param end
1 past the end of the content within buf.
@return a line map indexing the start position of each line.
nameB callers should use the
return value of {@link #author(byte[], int)} or
{@link #committer(byte[], int)}, as these methods provide the proper
position within the buffer.
@param raw
the buffer to parse character data from.
@param nameB
first position of the identity information. This should be the
first position After the space which delimits the header field
name (e.g. "author" or "committer") from the rest of the
identity line.
@return the parsed identity. Never null.
nameB callers should use the
return value of {@link #author(byte[], int)} or
{@link #committer(byte[], int)}, as these methods provide the proper
position within the buffer.
@param raw
the buffer to parse character data from.
@param nameB
first position of the identity information. This should be the
first position After the space which delimits the header field
name (e.g. "author" or "committer") from the rest of the
identity line.
@return the parsed identity. Never null.
[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.
@throws CharacterCodingException
the input is not in any of the tested character sets.
[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.
/1024.
true then all read methods will signal EOF
by returning -1, until another InputStream has been pushed into the queue
with 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.
patch-delta.c in the
GIT project. The original delta patching code was written by Nicolas Pitre
(<nico@cam.org>).
objects directory.
a list of alternate object directories
objects directory.
return isSymbolic() ? getTarget().getLeaf() : this;
ref^{} (the ref peeled to commit).
.Equals(Object) equality. This
allows subclasses to override Equals to supply their own
extended semantics.
(PackFile, position) tuple to an object.
(PackFile,position) key tuple.
This is ensured by an array of _locks, with the tuple hashed to a @lock instance.
(PackFile, position) tuple.
load() invocation there is exactly one
createRef() there will be
exactly one call to (pack,position), but multiple threads can call this method
concurrently for different (pack,position) tuples.
@ref.get() to return null.
(PackFile,position) tuple.
return packHash + (int) (position >>> 4).
Implementors must override with a suitable hash (for example, a different
right shift on the position).
.idx file listing the contents.
path of the .pack file holding the data.
Iterator<MutableEntry> eItr = index.iterator();
int curPosition = 0;
while (eItr.hasNext() && curPosition++ < nthPosition)
eItr.next();
ObjectId result = eItr.next().ToObjectId();
@param nthPosition
position within the traversal of {@link #iterator()} that the
caller needs the object for. The first returned
{@link MutableEntry} is 0, the second is 1, etc.
@return the ObjectId for the corresponding entry.
Iterator<MutableEntry> eItr = index.iterator();
int curPosition = 0;
while (eItr.hasNext() && curPosition++ < nthPosition)
eItr.next();
ObjectId result = eItr.next().ToObjectId();
@param nthPosition
unsigned 32 bit position within the traversal of
{@link #iterator()} that the caller needs the object for. The
first returned {@link MutableEntry} is 0, the second is 1,
etc. Positions past 2**31-1 are negative, but still valid.
@return the ObjectId for the corresponding entry.
.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.
writeOneEntry is specific to the index
format in use. Additional headers/footers may be used if necessary and
the entries collection may be iterated over more than once if
necessary. Implementors therefore have complete control over the data.
.keep file.
pack-*.pack file.
pack-*.keep file, with the given message.
.keep file that holds this pack in place.
packed-refs file, with others.
return update(new RevWalk(getRepository()));
return delete(new RevWalk(getRepository()));
return getRef(Constants.HEAD).getTarget().getName()
Except when HEAD is detached, in which case this method returns the
current ObjectId in hexadecimal string format.
true, will scan first to see if it's possible to check out,
otherwise throw false,
it will silently deal with the problem.