You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

JGitText.java 34KB

Support creating pack bitmap indexes in PackWriter. Update the PackWriter to support writing out pack bitmap indexes, a parallel ".bitmap" file to the ".pack" file. Bitmaps are selected at commits every 1 to 5,000 commits for each unique path from the start. The most recent 100 commits are all bitmapped. The next 19,000 commits have a bitmaps every 100 commits. The remaining commits have a bitmap every 5,000 commits. Commits with more than 1 parent are prefered over ones with 1 or less. Furthermore, previously computed bitmaps are reused, if the previous entry had the reuse flag set, which is set when the bitmap was placed at the max allowed distance. Bitmaps are used to speed up the counting phase when packing, for requests that are not shallow. The PackWriterBitmapWalker uses a RevFilter to proactively mark commits with RevFlag.SEEN, when they appear in a bitmap. The walker produces the full closure of reachable ObjectIds, given the collection of starting ObjectIds. For fetch request, two ObjectWalks are executed to compute the ObjectIds reachable from the haves and from the wants. The ObjectIds needed to be written are determined by taking all the resulting wants AND NOT the haves. For clone requests, we get cached pack support for "free" since it is possible to determine if all of the ObjectIds in a pack file are included in the resulting list of ObjectIds to write. On my machine, the best times for clones and fetches of the linux kernel repository (with about 2.6M objects and 300K commits) are tabulated below: Operation Index V2 Index VE003 Clone 37530ms (524.06 MiB) 82ms (524.06 MiB) Fetch (1 commit back) 75ms 107ms Fetch (10 commits back) 456ms (269.51 KiB) 341ms (265.19 KiB) Fetch (100 commits back) 449ms (269.91 KiB) 337ms (267.28 KiB) Fetch (1000 commits back) 2229ms ( 14.75 MiB) 189ms ( 14.42 MiB) Fetch (10000 commits back) 2177ms ( 16.30 MiB) 254ms ( 15.88 MiB) Fetch (100000 commits back) 14340ms (185.83 MiB) 1655ms (189.39 MiB) Change-Id: Icdb0cdd66ff168917fb9ef17b96093990cc6a98d
11 years ago
blame: Compute the origin of lines in a result file BlameGenerator digs through history and discovers the origin of each line of some result file. BlameResult consumes the stream of regions created by the generator and lays them out in a table for applications to display alongside of source lines. Applications may optionally push in the working tree copy of a file using the push(String, byte[]) method, allowing the application to receive accurate line annotations for the working tree version. Lines that are uncommitted (difference between HEAD and working tree) will show up with the description given by the application as the author, or "Not Committed Yet" as a default string. Applications may also run the BlameGenerator in reverse mode using the reverse(AnyObjectId, AnyObjectId) method instead of push(). When running in the reverse mode the generator annotates lines by the commit they are removed in, rather than the commit they were added in. This allows a user to discover where a line disappeared from when they are looking at an older revision in the repository. For example: blame --reverse 16e810b2..master -L 1080, org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefDirectoryTest.java ( 1080) } 2302a6d3 (Christian Halstrick 2011-05-20 11:18:20 +0200 1081) 2302a6d3 (Christian Halstrick 2011-05-20 11:18:20 +0200 1082) /** 2302a6d3 (Christian Halstrick 2011-05-20 11:18:20 +0200 1083) * Kick the timestamp of a local file. Above we learn that line 1080 (a closing curly brace of the prior method) still exists in branch master, but the Javadoc comment below it has been removed by Christian Halstrick on May 20th as part of commit 2302a6d3. This result differs considerably from that of C Git's blame --reverse feature. JGit tells the reader which commit performed the delete, while C Git tells the reader the last commit that still contained the line, leaving it an exercise to the reader to discover the descendant that performed the removal. This is still only a basic implementation. Quite notably it is missing support for the smart block copy/move detection that the C implementation of `git blame` is well known for. Despite being incremental, the BlameGenerator can only be run once. After the generator runs it cannot be reused. A better implementation would support applications browsing through history efficiently. In regards to CQ 5110, only a little of the original code survives. CQ: 5110 Bug: 306161 Change-Id: I84b8ea4838bb7d25f4fcdd540547884704661b8f Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
13 years ago
Support creating pack bitmap indexes in PackWriter. Update the PackWriter to support writing out pack bitmap indexes, a parallel ".bitmap" file to the ".pack" file. Bitmaps are selected at commits every 1 to 5,000 commits for each unique path from the start. The most recent 100 commits are all bitmapped. The next 19,000 commits have a bitmaps every 100 commits. The remaining commits have a bitmap every 5,000 commits. Commits with more than 1 parent are prefered over ones with 1 or less. Furthermore, previously computed bitmaps are reused, if the previous entry had the reuse flag set, which is set when the bitmap was placed at the max allowed distance. Bitmaps are used to speed up the counting phase when packing, for requests that are not shallow. The PackWriterBitmapWalker uses a RevFilter to proactively mark commits with RevFlag.SEEN, when they appear in a bitmap. The walker produces the full closure of reachable ObjectIds, given the collection of starting ObjectIds. For fetch request, two ObjectWalks are executed to compute the ObjectIds reachable from the haves and from the wants. The ObjectIds needed to be written are determined by taking all the resulting wants AND NOT the haves. For clone requests, we get cached pack support for "free" since it is possible to determine if all of the ObjectIds in a pack file are included in the resulting list of ObjectIds to write. On my machine, the best times for clones and fetches of the linux kernel repository (with about 2.6M objects and 300K commits) are tabulated below: Operation Index V2 Index VE003 Clone 37530ms (524.06 MiB) 82ms (524.06 MiB) Fetch (1 commit back) 75ms 107ms Fetch (10 commits back) 456ms (269.51 KiB) 341ms (265.19 KiB) Fetch (100 commits back) 449ms (269.91 KiB) 337ms (267.28 KiB) Fetch (1000 commits back) 2229ms ( 14.75 MiB) 189ms ( 14.42 MiB) Fetch (10000 commits back) 2177ms ( 16.30 MiB) 254ms ( 15.88 MiB) Fetch (100000 commits back) 14340ms (185.83 MiB) 1655ms (189.39 MiB) Change-Id: Icdb0cdd66ff168917fb9ef17b96093990cc6a98d
11 years ago
PackWriter: Support reuse of entire packs The most expensive part of packing a repository for transport to another system is enumerating all of the objects in the repository. Once this gets to the size of the linux-2.6 repository (1.8 million objects), enumeration can take several CPU minutes and costs a lot of temporary working set memory. Teach PackWriter to efficiently reuse an existing "cached pack" by answering a clone request with a thin pack followed by a larger cached pack appended to the end. This requires the repository owner to first construct the cached pack by hand, and record the tip commits inside of $GIT_DIR/objects/info/cached-packs: cd $GIT_DIR root=$(git rev-parse master) tmp=objects/.tmp-$$ names=$(echo $root | git pack-objects --keep-true-parents --revs $tmp) for n in $names; do chmod a-w $tmp-$n.pack $tmp-$n.idx touch objects/pack/pack-$n.keep mv $tmp-$n.pack objects/pack/pack-$n.pack mv $tmp-$n.idx objects/pack/pack-$n.idx done (echo "+ $root"; for n in $names; do echo "P $n"; done; echo) >>objects/info/cached-packs git repack -a -d When a clone request needs to include $root, the corresponding cached pack will be copied as-is, rather than enumerating all of the objects that are reachable from $root. For a linux-2.6 kernel repository that should be about 376 MiB, the above process creates two packs of 368 MiB and 38 MiB[1]. This is a local disk usage increase of ~26 MiB, due to reduced delta compression between the large cached pack and the smaller recent activity pack. The overhead is similar to 1 full copy of the compressed project sources. With this cached pack in hand, JGit daemon completes a clone request in 1m17s less time, but a slightly larger data transfer (+2.39 MiB): Before: remote: Counting objects: 1861830, done remote: Finding sources: 100% (1861830/1861830) remote: Getting sizes: 100% (88243/88243) remote: Compressing objects: 100% (88184/88184) Receiving objects: 100% (1861830/1861830), 376.01 MiB | 19.01 MiB/s, done. remote: Total 1861830 (delta 4706), reused 1851053 (delta 1553844) Resolving deltas: 100% (1564621/1564621), done. real 3m19.005s After: remote: Counting objects: 1601, done remote: Counting objects: 1828460, done remote: Finding sources: 100% (50475/50475) remote: Getting sizes: 100% (18843/18843) remote: Compressing objects: 100% (7585/7585) remote: Total 1861830 (delta 2407), reused 1856197 (delta 37510) Receiving objects: 100% (1861830/1861830), 378.40 MiB | 31.31 MiB/s, done. Resolving deltas: 100% (1559477/1559477), done. real 2m2.938s Repository owners can periodically refresh their cached packs by repacking their repository, folding all newer objects into a larger cached pack. Since repacking is already considered to be a normal Git maintenance activity, this isn't a very big burden. [1] In this test $root was set back about two weeks. Change-Id: Ib87131d5c4b5e8c5cacb0f4fe16ff4ece554734b Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
13 years ago
Added read/write support for pack bitmap index. A pack bitmap index is an additional index of compressed bitmaps of the object graph. Furthermore, a logical API of the index functionality is included, as it is expected to be used by the PackWriter. Compressed bitmaps are created using the javaewah library, which is a word-aligned compressed variant of the Java bitset class based on run-length encoding. The library only works with positive integer values. Thus, the maximum number of ObjectIds in a pack file that this index can currently support is limited to Integer.MAX_VALUE. Every ObjectId is given an integer mapping. The integer is the position of the ObjectId in the complete ObjectId list, sorted by offset, for the pack file. That integer is what the bitmaps use to reference the ObjectId. Currently, the new index format can only be used with pack files that contain a complete closure of the object graph e.g. the result of a garbage collection. The index file includes four bitmaps for the Git object types i.e. commits, trees, blobs, and tags. In addition, a collection of bitmaps keyed by an ObjectId is also included. The bitmap for each entry in the collection represents the full closure of ObjectIds reachable from the keyed ObjectId (including the keyed ObjectId itself). The bitmaps are further compressed by XORing the current bitmaps against prior bitmaps in the index, and selecting the smallest representation. The XOR'd bitmap and offset from the current entry to the position of the bitmap to XOR against is the actual representation of the entry in the index file. Each entry contains one byte, which is currently used to note whether the bitmap should be blindly reused. Change-Id: Id328724bf6b4c8366a088233098c18643edcf40f
11 years ago
Merging Git notes Merging Git notes branches has several differences from merging "normal" branches. Although Git notes are initially stored as one flat tree the tree may fanout when the number of notes becomes too large for efficient access. In this case the first two hex digits of the note name will be used as a subdirectory name and the rest 38 hex digits as the file name under that directory. Similarly, when number of notes decreases a fanout tree may collapse back into a flat tree. The Git notes merge algorithm must take into account possibly different tree structures in different note branches and must properly match them against each other. Any conflict on a Git note is, by default, resolved by concatenating the two conflicting versions of the note. A delete-edit conflict is, by default, resolved by keeping the edit version. The note merge logic is pluggable and the caller may provide custom note merger that will perform different merging strategy. Additionally, it is possible to have non-note entries inside a notes tree. The merge algorithm must also take this fact into account and will try to merge such non-note entries. However, in case of any merge conflicts the merge operation will fail. Git notes merge algorithm is currently not trying to do content merge of non-note entries. Thanks to Shawn Pearce for patiently answering my questions related to this topic, giving hints and providing code snippets. Change-Id: I3b2335c76c766fd7ea25752e54087f9b19d69c88 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
13 years ago
Added read/write support for pack bitmap index. A pack bitmap index is an additional index of compressed bitmaps of the object graph. Furthermore, a logical API of the index functionality is included, as it is expected to be used by the PackWriter. Compressed bitmaps are created using the javaewah library, which is a word-aligned compressed variant of the Java bitset class based on run-length encoding. The library only works with positive integer values. Thus, the maximum number of ObjectIds in a pack file that this index can currently support is limited to Integer.MAX_VALUE. Every ObjectId is given an integer mapping. The integer is the position of the ObjectId in the complete ObjectId list, sorted by offset, for the pack file. That integer is what the bitmaps use to reference the ObjectId. Currently, the new index format can only be used with pack files that contain a complete closure of the object graph e.g. the result of a garbage collection. The index file includes four bitmaps for the Git object types i.e. commits, trees, blobs, and tags. In addition, a collection of bitmaps keyed by an ObjectId is also included. The bitmap for each entry in the collection represents the full closure of ObjectIds reachable from the keyed ObjectId (including the keyed ObjectId itself). The bitmaps are further compressed by XORing the current bitmaps against prior bitmaps in the index, and selecting the smallest representation. The XOR'd bitmap and offset from the current entry to the position of the bitmap to XOR against is the actual representation of the entry in the index file. Each entry contains one byte, which is currently used to note whether the bitmap should be blindly reused. Change-Id: Id328724bf6b4c8366a088233098c18643edcf40f
11 years ago
Handle stale file handles on packed-refs file On a local filesystem the packed-refs file will be orphaned if it is replaced by another client while the current client is reading the old one. However, since NFS servers do not keep track of open files, instead of orphaning the old packed-refs file, such a replacement will cause the old file to be garbage collected instead. A stale file handle exception will be raised on NFS servers if the file is garbage collected (deleted) on the server while it is being read. Since we no longer have access to the old file in these cases, the previous code would just fail. However, in these cases, reopening the file and rereading it will succeed (since it will reopen the new replacement file). So retrying the read is a viable strategy to deal with stale file handles on the packed-refs file, implement such a strategy. Since it is possible that the packed-refs file could be replaced again while rereading it (multiple consecutive updates can easily occur with ref deletions), loop on stale file handle exceptions, up to 5 extra times, trying to read the packed-refs file again, until we either read the new file, or find that the file no longer exists. The limit of 5 is arbitrary, and provides a safe upper bounds to prevent infinite loops consuming resources in a potential unforeseen persistent error condition. Change-Id: I085c472bafa6e2f32f610a33ddc8368bb4ab1814 Signed-off-by: Martin Fick<mfick@codeaurora.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
8 years ago
Rewrite push certificate parsing - Consistently return structured data, such as actual ReceiveCommands, which is more useful for callers that are doing things other than verifying the signature, e.g. recording the set of commands. - Store the certificate version field, as this is required to be part of the signed payload. - Add a toText() method to recreate the actual payload for signature verification. This requires keeping track of the un-chomped command strings from the original protocol stream. - Separate the parser from the certificate itself, so the actual PushCertificate object can be immutable. Make a fair attempt at deep immutability, but this is not possible with the current mutable ReceiveCommand structure. - Use more detailed error messages that don't involve NON-NLS strings. - Document null return values more thoroughly. Instead of having the undocumented behavior of throwing NPE from certain methods if they are not first guarded by enabled(), eliminate enabled() and return null from those methods. - Add tests for parsing a push cert from a section of pkt-line stream using a real live stream captured with Wireshark (which, it should be noted, uncovered several simply incorrect statements in C git's Documentation/technical/pack-protocol.txt). This is a slightly breaking API change to classes that were technically public and technically released in 4.0. However, it is highly unlikely that people were actually depending on public behavior, since there were no public methods to create PushCertificates with anything other than null field values, or a PushCertificateParser that did anything other than infinite loop or throw exceptions when reading. Change-Id: I5382193347a8eb1811032d9b32af9651871372d0
9 years ago
maxObjectSizeLimit for receive-pack. ReceivePack (and PackParser) can be configured with the maxObjectSizeLimit in order to prevent users from pushing too large objects to Git. The limit check is applied to all object types although it is most likely that a BLOB will exceed the limit. In all cases the size of the object header is excluded from the object size which is checked against the limit as this is the size of which a BLOB object would take in the working tree when checked out as a file. When an object exceeds the maxObjectSizeLimit the receive-pack will abort immediately. Delta objects (both offset and ref delta) are also checked against the limit. However, for delta objects we will first check the size of the inflated delta block against the maxObjectSizeLimit and abort immediately if it exceeds the limit. In this case we even do not know the exact size of the resolved delta object but we assume it will be larger than the given maxObjectSizeLimit as delta is generally only chosen if the delta can copy more data from the base object than the delta needs to insert or needs to represent the copy ranges. Aborting early, in this case, avoids unnecessary inflating of the (huge) delta block. Unfortunately, it is too expensive (especially for a large delta) to compute SHA-1 of an object that causes the receive-pack to abort. This would decrease the value of this feature whose main purpose is to protect server resources from users pushing huge objects. Therefore we don't report the SHA-1 in the error message. Change-Id: I177ef24553faacda444ed5895e40ac8925ca0d1e Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
12 years ago
Implement similarity based rename detection Content similarity based rename detection is performed only after a linear time detection is performed using exact content match on the ObjectIds. Any names which were paired up during that exact match phase are excluded from the inexact similarity based rename, which reduces the space that must be considered. During rename detection two entries cannot be marked as a rename if they are different types of files. This prevents a symlink from being renamed to a regular file, even if their blob content appears to be similar, or is identical. Efficiently comparing two files is performed by building up two hash indexes and hashing lines or short blocks from each file, counting the number of bytes that each line or block represents. Instead of using a standard java.util.HashMap, we use a custom open hashing scheme similiar to what we use in ObjecIdSubclassMap. This permits us to have a very light-weight hash, with very little memory overhead per cell stored. As we only need two ints per record in the map (line/block key and number of bytes), we collapse them into a single long inside of a long array, making very efficient use of available memory when we create the index table. We only need object headers for the index structure itself, and the index table, but not per-cell. This offers a massive space savings over using java.util.HashMap. The score calculation is done by approximating how many bytes are the same between the two inputs (which for a delta would be how much is copied from the base into the result). The score is derived by dividing the approximate number of bytes in common into the length of the larger of the two input files. Right now the SimilarityIndex table should average about 1/2 full, which means we waste about 50% of our memory on empty entries after we are done indexing a file and sort the table's contents. If memory becomes an issue we could discard the table and copy all records over to a new array that is properly sized. Building the index requires O(M + N log N) time, where M is the size of the input file in bytes, and N is the number of unique lines/blocks in the file. The N log N time constraint comes from the sort of the index table that is necessary to perform linear time matching against another SimilarityIndex created for a different file. To actually perform the rename detection, a SxD matrix is created, placing the sources (aka deletions) along one dimension and the destinations (aka additions) along the other. A simple O(S x D) loop examines every cell in this matrix. A SimilarityIndex is built along the row and reused for each column compare along that row, avoiding the costly index rebuild at the row level. A future improvement would be to load a smaller square matrix into SimilarityIndexes and process everything in that sub-matrix before discarding the column dimension and moving down to the next sub-matrix block along that same grid of rows. An optional ProgressMonitor is permitted to be passed in, allowing applications to see the progress of the detector as it works through the matrix cells. This provides some indication of current status for very long running renames. The default line/block hash function used by the SimilarityIndex may not be optimal, and may produce too many collisions. It is borrowed from RawText's hash, which is used to quickly skip out of a longer equality test if two lines have different hash functions. We may need to refine this hash in the future, in order to minimize the number of collisions we get on common source files. Based on a handful of test commits in JGit (especially my own recent rename repository refactoring series), this rename detector produces output that is very close to C Git. The content similarity scores are sometimes off by 1%, which is most probably caused by our SimilarityIndex type using a different hash function than C Git uses when it computes the delta size between any two objects in the rename matrix. Bug: 318504 Change-Id: I11dff969e8a2e4cf252636d857d2113053bdd9dc Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years ago
Increase core.streamFileThreshold default to 50 MiB Projects like org.eclipse.mdt contain large XML files about 6 MiB in size. So does the Android project platform/frameworks/base. Doing a clone of either project with JGit takes forever to checkout the files into the working directory, because delta decompression tends to be very expensive as we need to constantly reposition the base stream for each copy instruction. This can be made worse by a very bad ordering of offsets, possibly due to an XML editor that doesn't preserve the order of elements in the file very well. Increasing the threshold to the same limit PackWriter uses when doing delta compression (50 MiB) permits a default configured JGit to decompress these XML file objects using the faster random-access arrays, rather than re-seeking through an inflate stream, significantly reducing checkout time after a clone. Since this new limit may be dangerously close to the JVM maximum heap size, every allocation attempt is now wrapped in a try/catch so that JGit can degrade by switching to the large object stream mode when the allocation is refused. It will run slower, but the operation will still complete. The large stream mode will run very well for big objects that aren't delta compressed, and is acceptable for delta compressed objects that are using only forward referencing copy instructions. Copies using prior offsets are still going to be horrible, and there is nothing we can do about it except increase core.streamFileThreshold. We might in the future want to consider changing the way the delta generators work in JGit and native C Git to avoid prior offsets once an object reaches a certain size, even if that causes the delta instruction stream to be slightly larger. Unfortunately native C Git won't want to do that until its also able to stream objects rather than malloc them as contiguous blocks. Change-Id: Ief7a3896afce15073e80d3691bed90c6a3897307 Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
13 years ago
Support creating pack bitmap indexes in PackWriter. Update the PackWriter to support writing out pack bitmap indexes, a parallel ".bitmap" file to the ".pack" file. Bitmaps are selected at commits every 1 to 5,000 commits for each unique path from the start. The most recent 100 commits are all bitmapped. The next 19,000 commits have a bitmaps every 100 commits. The remaining commits have a bitmap every 5,000 commits. Commits with more than 1 parent are prefered over ones with 1 or less. Furthermore, previously computed bitmaps are reused, if the previous entry had the reuse flag set, which is set when the bitmap was placed at the max allowed distance. Bitmaps are used to speed up the counting phase when packing, for requests that are not shallow. The PackWriterBitmapWalker uses a RevFilter to proactively mark commits with RevFlag.SEEN, when they appear in a bitmap. The walker produces the full closure of reachable ObjectIds, given the collection of starting ObjectIds. For fetch request, two ObjectWalks are executed to compute the ObjectIds reachable from the haves and from the wants. The ObjectIds needed to be written are determined by taking all the resulting wants AND NOT the haves. For clone requests, we get cached pack support for "free" since it is possible to determine if all of the ObjectIds in a pack file are included in the resulting list of ObjectIds to write. On my machine, the best times for clones and fetches of the linux kernel repository (with about 2.6M objects and 300K commits) are tabulated below: Operation Index V2 Index VE003 Clone 37530ms (524.06 MiB) 82ms (524.06 MiB) Fetch (1 commit back) 75ms 107ms Fetch (10 commits back) 456ms (269.51 KiB) 341ms (265.19 KiB) Fetch (100 commits back) 449ms (269.91 KiB) 337ms (267.28 KiB) Fetch (1000 commits back) 2229ms ( 14.75 MiB) 189ms ( 14.42 MiB) Fetch (10000 commits back) 2177ms ( 16.30 MiB) 254ms ( 15.88 MiB) Fetch (100000 commits back) 14340ms (185.83 MiB) 1655ms (189.39 MiB) Change-Id: Icdb0cdd66ff168917fb9ef17b96093990cc6a98d
11 years ago
Shallow fetch: Respect "shallow" lines When fetching from a shallow clone, the client sends "have" lines to tell the server about objects it already has and "shallow" lines to tell where its local history terminates. In some circumstances, the server fails to honor the shallow lines and fails to return objects that the client needs. UploadPack passes the "have" lines to PackWriter so PackWriter can omit them from the generated pack. UploadPack processes "shallow" lines by calling RevWalk.assumeShallow() with the set of shallow commits. RevWalk creates and caches RevCommits for these shallow commits, clearing out their parents. That way, walks correctly terminate at the shallow commits instead of assuming the client has history going back behind them. UploadPack converts its RevWalk to an ObjectWalk, maintaining the cached RevCommits, and passes it to PackWriter. Unfortunately, to support shallow fetches the PackWriter does the following: if (shallowPack && !(walk instanceof DepthWalk.ObjectWalk)) walk = new DepthWalk.ObjectWalk(reader, depth); That is, when the client sends a "deepen" line (fetch --depth=<n>) and the caller has not passed in a DepthWalk.ObjectWalk, PackWriter throws away the RevWalk that was passed in and makes a new one. The cleared parent lists prepared by RevWalk.assumeShallow() are lost. Fortunately UploadPack intends to pass in a DepthWalk.ObjectWalk. It tries to create it by calling toObjectWalkWithSameObjects() on a DepthWalk.RevWalk. But it doesn't work: because DepthWalk.RevWalk does not override the standard RevWalk#toObjectWalkWithSameObjects implementation, the result is a plain ObjectWalk instead of an instance of DepthWalk.ObjectWalk. The result is that the "shallow" information is thrown away and objects reachable from the shallow commits can be omitted from the pack sent when fetching with --depth from a shallow clone. Multiple factors collude to limit the circumstances under which this bug can be observed: 1. Commits with depth != 0 don't enter DepthGenerator's pending queue. That means a "have" cannot have any effect on DepthGenerator unless it is also a "want". 2. DepthGenerator#next() doesn't call carryFlagsImpl(), so the uninteresting flag is not propagated to ancestors there even if a "have" is also a "want". 3. JGit treats a depth of 1 as "1 past the wants". Because of (2), the only place the UNINTERESTING flag can leak to a shallow commit's parents is in the carryFlags() call from markUninteresting(). carryFlags() only traverses commits that have already been parsed: commits yet to be parsed are supposed to inherit correct flags from their parent in PendingGenerator#next (which doesn't happen here --- that is (2)). So the list of commits that have already been parsed becomes relevant. When we hit the markUninteresting() call, all "want"s, "have"s, and commits to be unshallowed have been parsed. carryFlags() only affects the parsed commits. If the "want" is a direct parent of a "have", then it carryFlags() marks it as uninteresting. If the "have" was also a "shallow", then its parent pointer should have been null and the "want" shouldn't have been marked, so we see the bug. If the "want" is a more distant ancestor then (2) keeps the uninteresting state from propagating to the "want" and we don't see the bug. If the "shallow" is not also a "have" then the shallow commit isn't parsed so (2) keeps the uninteresting state from propagating to the "want so we don't see the bug. Here is a reproduction case (time flowing left to right, arrows pointing to parents). "C" must be a commit that the client reports as a "have" during negotiation. That can only happen if the server reports it as an existing branch or tag in the first round of negotiation: A <-- B <-- C <-- D First do git clone --depth 1 <repo> which yields D as a "have" and C as a "shallow" commit. Then try git fetch --depth 1 <repo> B:refs/heads/B Negotiation sets up: have D, shallow C, have C, want B. But due to this bug B is marked as uninteresting and is not sent. Change-Id: I6e14b57b2f85e52d28cdcf356df647870f475440 Signed-off-by: Terry Parker <tparker@google.com>
7 years ago
Implement similarity based rename detection Content similarity based rename detection is performed only after a linear time detection is performed using exact content match on the ObjectIds. Any names which were paired up during that exact match phase are excluded from the inexact similarity based rename, which reduces the space that must be considered. During rename detection two entries cannot be marked as a rename if they are different types of files. This prevents a symlink from being renamed to a regular file, even if their blob content appears to be similar, or is identical. Efficiently comparing two files is performed by building up two hash indexes and hashing lines or short blocks from each file, counting the number of bytes that each line or block represents. Instead of using a standard java.util.HashMap, we use a custom open hashing scheme similiar to what we use in ObjecIdSubclassMap. This permits us to have a very light-weight hash, with very little memory overhead per cell stored. As we only need two ints per record in the map (line/block key and number of bytes), we collapse them into a single long inside of a long array, making very efficient use of available memory when we create the index table. We only need object headers for the index structure itself, and the index table, but not per-cell. This offers a massive space savings over using java.util.HashMap. The score calculation is done by approximating how many bytes are the same between the two inputs (which for a delta would be how much is copied from the base into the result). The score is derived by dividing the approximate number of bytes in common into the length of the larger of the two input files. Right now the SimilarityIndex table should average about 1/2 full, which means we waste about 50% of our memory on empty entries after we are done indexing a file and sort the table's contents. If memory becomes an issue we could discard the table and copy all records over to a new array that is properly sized. Building the index requires O(M + N log N) time, where M is the size of the input file in bytes, and N is the number of unique lines/blocks in the file. The N log N time constraint comes from the sort of the index table that is necessary to perform linear time matching against another SimilarityIndex created for a different file. To actually perform the rename detection, a SxD matrix is created, placing the sources (aka deletions) along one dimension and the destinations (aka additions) along the other. A simple O(S x D) loop examines every cell in this matrix. A SimilarityIndex is built along the row and reused for each column compare along that row, avoiding the costly index rebuild at the row level. A future improvement would be to load a smaller square matrix into SimilarityIndexes and process everything in that sub-matrix before discarding the column dimension and moving down to the next sub-matrix block along that same grid of rows. An optional ProgressMonitor is permitted to be passed in, allowing applications to see the progress of the detector as it works through the matrix cells. This provides some indication of current status for very long running renames. The default line/block hash function used by the SimilarityIndex may not be optimal, and may produce too many collisions. It is borrowed from RawText's hash, which is used to quickly skip out of a longer equality test if two lines have different hash functions. We may need to refine this hash in the future, in order to minimize the number of collisions we get on common source files. Based on a handful of test commits in JGit (especially my own recent rename repository refactoring series), this rename detector produces output that is very close to C Git. The content similarity scores are sometimes off by 1%, which is most probably caused by our SimilarityIndex type using a different hash function than C Git uses when it computes the delta size between any two objects in the rename matrix. Bug: 318504 Change-Id: I11dff969e8a2e4cf252636d857d2113053bdd9dc Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
14 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  1. /*
  2. * Copyright (C) 2010, 2013 Sasa Zivkov <sasa.zivkov@sap.com>
  3. * Copyright (C) 2012, Research In Motion Limited
  4. * and other copyright owners as documented in the project's IP log.
  5. *
  6. * This program and the accompanying materials are made available
  7. * under the terms of the Eclipse Distribution License v1.0 which
  8. * accompanies this distribution, is reproduced below, and is
  9. * available at http://www.eclipse.org/org/documents/edl-v10.php
  10. *
  11. * All rights reserved.
  12. *
  13. * Redistribution and use in source and binary forms, with or
  14. * without modification, are permitted provided that the following
  15. * conditions are met:
  16. *
  17. * - Redistributions of source code must retain the above copyright
  18. * notice, this list of conditions and the following disclaimer.
  19. *
  20. * - Redistributions in binary form must reproduce the above
  21. * copyright notice, this list of conditions and the following
  22. * disclaimer in the documentation and/or other materials provided
  23. * with the distribution.
  24. *
  25. * - Neither the name of the Eclipse Foundation, Inc. nor the
  26. * names of its contributors may be used to endorse or promote
  27. * products derived from this software without specific prior
  28. * written permission.
  29. *
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  31. * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  32. * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  33. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  34. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  35. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  36. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  37. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  38. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  39. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  40. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  41. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  42. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  43. */
  44. package org.eclipse.jgit.internal;
  45. import org.eclipse.jgit.nls.NLS;
  46. import org.eclipse.jgit.nls.TranslationBundle;
  47. /**
  48. * Translation bundle for JGit core
  49. */
  50. public class JGitText extends TranslationBundle {
  51. /**
  52. * @return an instance of this translation bundle
  53. */
  54. public static JGitText get() {
  55. return NLS.getBundleFor(JGitText.class);
  56. }
  57. // @formatter:off
  58. /***/ public String abbreviationLengthMustBeNonNegative;
  59. /***/ public String abortingRebase;
  60. /***/ public String abortingRebaseFailed;
  61. /***/ public String abortingRebaseFailedNoOrigHead;
  62. /***/ public String advertisementCameBefore;
  63. /***/ public String advertisementOfCameBefore;
  64. /***/ public String amazonS3ActionFailed;
  65. /***/ public String amazonS3ActionFailedGivingUp;
  66. /***/ public String ambiguousObjectAbbreviation;
  67. /***/ public String aNewObjectIdIsRequired;
  68. /***/ public String anExceptionOccurredWhileTryingToAddTheIdOfHEAD;
  69. /***/ public String anSSHSessionHasBeenAlreadyCreated;
  70. /***/ public String applyingCommit;
  71. /***/ public String archiveFormatAlreadyAbsent;
  72. /***/ public String archiveFormatAlreadyRegistered;
  73. /***/ public String argumentIsNotAValidCommentString;
  74. /***/ public String atLeastOnePathIsRequired;
  75. /***/ public String atLeastOnePatternIsRequired;
  76. /***/ public String atLeastTwoFiltersNeeded;
  77. /***/ public String atomicPushNotSupported;
  78. /***/ public String atomicRefUpdatesNotSupported;
  79. /***/ public String authenticationNotSupported;
  80. /***/ public String badBase64InputCharacterAt;
  81. /***/ public String badEntryDelimiter;
  82. /***/ public String badEntryName;
  83. /***/ public String badEscape;
  84. /***/ public String badGroupHeader;
  85. /***/ public String badObjectType;
  86. /***/ public String badRef;
  87. /***/ public String badSectionEntry;
  88. /***/ public String bareRepositoryNoWorkdirAndIndex;
  89. /***/ public String base64InputNotProperlyPadded;
  90. /***/ public String baseLengthIncorrect;
  91. /***/ public String bitmapMissingObject;
  92. /***/ public String bitmapsMustBePrepared;
  93. /***/ public String blameNotCommittedYet;
  94. /***/ public String blobNotFound;
  95. /***/ public String blobNotFoundForPath;
  96. /***/ public String blockSizeNotPowerOf2;
  97. /***/ public String branchNameInvalid;
  98. /***/ public String buildingBitmaps;
  99. /***/ public String cachedPacksPreventsIndexCreation;
  100. /***/ public String cachedPacksPreventsListingObjects;
  101. /***/ public String cannotBeCombined;
  102. /***/ public String cannotBeRecursiveWhenTreesAreIncluded;
  103. /***/ public String cannotChangeActionOnComment;
  104. /***/ public String cannotChangeToComment;
  105. /***/ public String cannotCheckoutFromUnbornBranch;
  106. /***/ public String cannotCheckoutOursSwitchBranch;
  107. /***/ public String cannotCombineSquashWithNoff;
  108. /***/ public String cannotCombineTreeFilterWithRevFilter;
  109. /***/ public String cannotCommitOnARepoWithState;
  110. /***/ public String cannotCommitWriteTo;
  111. /***/ public String cannotConnectPipes;
  112. /***/ public String cannotConvertScriptToText;
  113. /***/ public String cannotCreateConfig;
  114. /***/ public String cannotCreateDirectory;
  115. /***/ public String cannotCreateHEAD;
  116. /***/ public String cannotCreateIndexfile;
  117. /***/ public String cannotCreateTempDir;
  118. /***/ public String cannotDeleteCheckedOutBranch;
  119. /***/ public String cannotDeleteFile;
  120. /***/ public String cannotDeleteObjectsPath;
  121. /***/ public String cannotDeleteStaleTrackingRef;
  122. /***/ public String cannotDeleteStaleTrackingRef2;
  123. /***/ public String cannotDetermineProxyFor;
  124. /***/ public String cannotDownload;
  125. /***/ public String cannotEnterObjectsPath;
  126. /***/ public String cannotEnterPathFromParent;
  127. /***/ public String cannotExecute;
  128. /***/ public String cannotGet;
  129. /***/ public String cannotGetObjectsPath;
  130. /***/ public String cannotListObjectsPath;
  131. /***/ public String cannotListPackPath;
  132. /***/ public String cannotListRefs;
  133. /***/ public String cannotLock;
  134. /***/ public String cannotLockPackIn;
  135. /***/ public String cannotMatchOnEmptyString;
  136. /***/ public String cannotMkdirObjectPath;
  137. /***/ public String cannotMoveIndexTo;
  138. /***/ public String cannotMovePackTo;
  139. /***/ public String cannotOpenService;
  140. /***/ public String cannotParseDate;
  141. /***/ public String cannotParseGitURIish;
  142. /***/ public String cannotPullOnARepoWithState;
  143. /***/ public String cannotRead;
  144. /***/ public String cannotReadBlob;
  145. /***/ public String cannotReadCommit;
  146. /***/ public String cannotReadFile;
  147. /***/ public String cannotReadHEAD;
  148. /***/ public String cannotReadIndex;
  149. /***/ public String cannotReadObject;
  150. /***/ public String cannotReadObjectsPath;
  151. /***/ public String cannotReadTree;
  152. /***/ public String cannotRebaseWithoutCurrentHead;
  153. /***/ public String cannotResolveLocalTrackingRefForUpdating;
  154. /***/ public String cannotSquashFixupWithoutPreviousCommit;
  155. /***/ public String cannotStoreObjects;
  156. /***/ public String cannotResolveUniquelyAbbrevObjectId;
  157. /***/ public String cannotUnloadAModifiedTree;
  158. /***/ public String cannotUpdateUnbornBranch;
  159. /***/ public String cannotWorkWithOtherStagesThanZeroRightNow;
  160. /***/ public String cannotWriteObjectsPath;
  161. /***/ public String canOnlyCherryPickCommitsWithOneParent;
  162. /***/ public String canOnlyRevertCommitsWithOneParent;
  163. /***/ public String commitDoesNotHaveGivenParent;
  164. /***/ public String cantFindObjectInReversePackIndexForTheSpecifiedOffset;
  165. /***/ public String cantPassMeATree;
  166. /***/ public String channelMustBeInRange1_255;
  167. /***/ public String characterClassIsNotSupported;
  168. /***/ public String checkoutConflictWithFile;
  169. /***/ public String checkoutConflictWithFiles;
  170. /***/ public String checkoutUnexpectedResult;
  171. /***/ public String classCastNotA;
  172. /***/ public String cloneNonEmptyDirectory;
  173. /***/ public String closed;
  174. /***/ public String collisionOn;
  175. /***/ public String commandRejectedByHook;
  176. /***/ public String commandWasCalledInTheWrongState;
  177. /***/ public String commitAlreadyExists;
  178. /***/ public String commitMessageNotSpecified;
  179. /***/ public String commitOnRepoWithoutHEADCurrentlyNotSupported;
  180. /***/ public String commitAmendOnInitialNotPossible;
  181. /***/ public String compressingObjects;
  182. /***/ public String connectionFailed;
  183. /***/ public String connectionTimeOut;
  184. /***/ public String contextMustBeNonNegative;
  185. /***/ public String corruptionDetectedReReadingAt;
  186. /***/ public String corruptObjectBadDate;
  187. /***/ public String corruptObjectBadEmail;
  188. /***/ public String corruptObjectBadStream;
  189. /***/ public String corruptObjectBadStreamCorruptHeader;
  190. /***/ public String corruptObjectBadTimezone;
  191. /***/ public String corruptObjectDuplicateEntryNames;
  192. /***/ public String corruptObjectGarbageAfterSize;
  193. /***/ public String corruptObjectIncorrectLength;
  194. /***/ public String corruptObjectIncorrectSorting;
  195. /***/ public String corruptObjectInvalidEntryMode;
  196. /***/ public String corruptObjectInvalidMode;
  197. /***/ public String corruptObjectInvalidModeChar;
  198. /***/ public String corruptObjectInvalidModeStartsZero;
  199. /***/ public String corruptObjectInvalidMode2;
  200. /***/ public String corruptObjectInvalidMode3;
  201. /***/ public String corruptObjectInvalidName;
  202. /***/ public String corruptObjectInvalidNameAux;
  203. /***/ public String corruptObjectInvalidNameCon;
  204. /***/ public String corruptObjectInvalidNameCom;
  205. /***/ public String corruptObjectInvalidNameEnd;
  206. /***/ public String corruptObjectInvalidNameIgnorableUnicode;
  207. /***/ public String corruptObjectInvalidNameInvalidUtf8;
  208. /***/ public String corruptObjectInvalidNameLpt;
  209. /***/ public String corruptObjectInvalidNameNul;
  210. /***/ public String corruptObjectInvalidNamePrn;
  211. /***/ public String corruptObjectInvalidObject;
  212. /***/ public String corruptObjectInvalidParent;
  213. /***/ public String corruptObjectInvalidTree;
  214. /***/ public String corruptObjectInvalidType;
  215. /***/ public String corruptObjectInvalidType2;
  216. /***/ public String corruptObjectMalformedHeader;
  217. /***/ public String corruptObjectMissingEmail;
  218. /***/ public String corruptObjectNameContainsByte;
  219. /***/ public String corruptObjectNameContainsChar;
  220. /***/ public String corruptObjectNameContainsNullByte;
  221. /***/ public String corruptObjectNameContainsSlash;
  222. /***/ public String corruptObjectNameDot;
  223. /***/ public String corruptObjectNameDotDot;
  224. /***/ public String corruptObjectNameZeroLength;
  225. /***/ public String corruptObjectNegativeSize;
  226. /***/ public String corruptObjectNoAuthor;
  227. /***/ public String corruptObjectNoCommitter;
  228. /***/ public String corruptObjectNoHeader;
  229. /***/ public String corruptObjectNoObject;
  230. /***/ public String corruptObjectNoObjectHeader;
  231. /***/ public String corruptObjectNoTaggerBadHeader;
  232. /***/ public String corruptObjectNoTaggerHeader;
  233. /***/ public String corruptObjectNoTagHeader;
  234. /***/ public String corruptObjectNoTagName;
  235. /***/ public String corruptObjectNotree;
  236. /***/ public String corruptObjectNotreeHeader;
  237. /***/ public String corruptObjectNoType;
  238. /***/ public String corruptObjectNoTypeHeader;
  239. /***/ public String corruptObjectPackfileChecksumIncorrect;
  240. /***/ public String corruptObjectTruncatedInMode;
  241. /***/ public String corruptObjectTruncatedInName;
  242. /***/ public String corruptObjectTruncatedInObjectId;
  243. /***/ public String corruptObjectZeroId;
  244. /***/ public String corruptPack;
  245. /***/ public String corruptUseCnt;
  246. /***/ public String couldNotCheckOutBecauseOfConflicts;
  247. /***/ public String couldNotDeleteLockFileShouldNotHappen;
  248. /***/ public String couldNotDeleteTemporaryIndexFileShouldNotHappen;
  249. /***/ public String couldNotGetAdvertisedRef;
  250. /***/ public String couldNotGetRepoStatistics;
  251. /***/ public String couldNotLockHEAD;
  252. /***/ public String couldNotReadIndexInOneGo;
  253. /***/ public String couldNotReadObjectWhileParsingCommit;
  254. /***/ public String couldNotRenameDeleteOldIndex;
  255. /***/ public String couldNotRenameTemporaryFile;
  256. /***/ public String couldNotRenameTemporaryIndexFileToIndex;
  257. /***/ public String couldNotRewindToUpstreamCommit;
  258. /***/ public String couldNotURLEncodeToUTF8;
  259. /***/ public String couldNotWriteFile;
  260. /***/ public String countingObjects;
  261. /***/ public String createBranchFailedUnknownReason;
  262. /***/ public String createBranchUnexpectedResult;
  263. /***/ public String createNewFileFailed;
  264. /***/ public String credentialPassword;
  265. /***/ public String credentialUsername;
  266. /***/ public String daemonAlreadyRunning;
  267. /***/ public String daysAgo;
  268. /***/ public String deleteBranchUnexpectedResult;
  269. /***/ public String deleteFileFailed;
  270. /***/ public String deleteTagUnexpectedResult;
  271. /***/ public String deletingNotSupported;
  272. /***/ public String destinationIsNotAWildcard;
  273. /***/ public String detachedHeadDetected;
  274. /***/ public String dirCacheDoesNotHaveABackingFile;
  275. /***/ public String dirCacheFileIsNotLocked;
  276. /***/ public String dirCacheIsNotLocked;
  277. /***/ public String DIRCChecksumMismatch;
  278. /***/ public String DIRCExtensionIsTooLargeAt;
  279. /***/ public String DIRCExtensionNotSupportedByThisVersion;
  280. /***/ public String DIRCHasTooManyEntries;
  281. /***/ public String DIRCUnrecognizedExtendedFlags;
  282. /***/ public String dirtyFilesExist;
  283. /***/ public String doesNotHandleMode;
  284. /***/ public String downloadCancelled;
  285. /***/ public String downloadCancelledDuringIndexing;
  286. /***/ public String duplicateAdvertisementsOf;
  287. /***/ public String duplicateRef;
  288. /***/ public String duplicateRemoteRefUpdateIsIllegal;
  289. /***/ public String duplicateStagesNotAllowed;
  290. /***/ public String eitherGitDirOrWorkTreeRequired;
  291. /***/ public String emptyCommit;
  292. /***/ public String emptyPathNotPermitted;
  293. /***/ public String emptyRef;
  294. /***/ public String encryptionError;
  295. /***/ public String encryptionOnlyPBE;
  296. /***/ public String endOfFileInEscape;
  297. /***/ public String entryNotFoundByPath;
  298. /***/ public String enumValueNotSupported2;
  299. /***/ public String enumValueNotSupported3;
  300. /***/ public String enumValuesNotAvailable;
  301. /***/ public String errorDecodingFromFile;
  302. /***/ public String errorEncodingFromFile;
  303. /***/ public String errorInBase64CodeReadingStream;
  304. /***/ public String errorInPackedRefs;
  305. /***/ public String errorInvalidProtocolWantedOldNewRef;
  306. /***/ public String errorListing;
  307. /***/ public String errorOccurredDuringUnpackingOnTheRemoteEnd;
  308. /***/ public String errorReadingInfoRefs;
  309. /***/ public String exceptionCaughtDuringExecutionOfHook;
  310. /***/ public String exceptionCaughtDuringExecutionOfAddCommand;
  311. /***/ public String exceptionCaughtDuringExecutionOfArchiveCommand;
  312. /***/ public String exceptionCaughtDuringExecutionOfCherryPickCommand;
  313. /***/ public String exceptionCaughtDuringExecutionOfCommitCommand;
  314. /***/ public String exceptionCaughtDuringExecutionOfFetchCommand;
  315. /***/ public String exceptionCaughtDuringExecutionOfLsRemoteCommand;
  316. /***/ public String exceptionCaughtDuringExecutionOfMergeCommand;
  317. /***/ public String exceptionCaughtDuringExecutionOfPullCommand;
  318. /***/ public String exceptionCaughtDuringExecutionOfPushCommand;
  319. /***/ public String exceptionCaughtDuringExecutionOfResetCommand;
  320. /***/ public String exceptionCaughtDuringExecutionOfRevertCommand;
  321. /***/ public String exceptionCaughtDuringExecutionOfRmCommand;
  322. /***/ public String exceptionCaughtDuringExecutionOfTagCommand;
  323. /***/ public String exceptionCaughtDuringExcecutionOfCommand;
  324. /***/ public String exceptionHookExecutionInterrupted;
  325. /***/ public String exceptionOccurredDuringAddingOfOptionToALogCommand;
  326. /***/ public String exceptionOccurredDuringReadingOfGIT_DIR;
  327. /***/ public String exceptionWhileReadingPack;
  328. /***/ public String expectedACKNAKFoundEOF;
  329. /***/ public String expectedACKNAKGot;
  330. /***/ public String expectedBooleanStringValue;
  331. /***/ public String expectedCharacterEncodingGuesses;
  332. /***/ public String expectedEOFReceived;
  333. /***/ public String expectedGot;
  334. /***/ public String expectedLessThanGot;
  335. /***/ public String expectedPktLineWithService;
  336. /***/ public String expectedReceivedContentType;
  337. /***/ public String expectedReportForRefNotReceived;
  338. /***/ public String failedToDetermineFilterDefinition;
  339. /***/ public String failedUpdatingRefs;
  340. /***/ public String failureDueToOneOfTheFollowing;
  341. /***/ public String failureUpdatingFETCH_HEAD;
  342. /***/ public String failureUpdatingTrackingRef;
  343. /***/ public String fileCannotBeDeleted;
  344. /***/ public String fileIsTooBigForThisConvenienceMethod;
  345. /***/ public String fileIsTooLarge;
  346. /***/ public String fileModeNotSetForPath;
  347. /***/ public String filterExecutionFailed;
  348. /***/ public String filterExecutionFailedRc;
  349. /***/ public String findingGarbage;
  350. /***/ public String flagIsDisposed;
  351. /***/ public String flagNotFromThis;
  352. /***/ public String flagsAlreadyCreated;
  353. /***/ public String funnyRefname;
  354. /***/ public String gcFailed;
  355. /***/ public String gitmodulesNotFound;
  356. /***/ public String headRequiredToStash;
  357. /***/ public String hoursAgo;
  358. /***/ public String hugeIndexesAreNotSupportedByJgitYet;
  359. /***/ public String hunkBelongsToAnotherFile;
  360. /***/ public String hunkDisconnectedFromFile;
  361. /***/ public String hunkHeaderDoesNotMatchBodyLineCountOf;
  362. /***/ public String illegalArgumentNotA;
  363. /***/ public String illegalCombinationOfArguments;
  364. /***/ public String illegalHookName;
  365. /***/ public String illegalPackingPhase;
  366. /***/ public String illegalStateExists;
  367. /***/ public String improperlyPaddedBase64Input;
  368. /***/ public String incorrectHashFor;
  369. /***/ public String incorrectOBJECT_ID_LENGTH;
  370. /***/ public String indexFileCorruptedNegativeBucketCount;
  371. /***/ public String indexFileIsInUse;
  372. /***/ public String indexFileIsTooLargeForJgit;
  373. /***/ public String indexSignatureIsInvalid;
  374. /***/ public String indexWriteException;
  375. /***/ public String initFailedBareRepoDifferentDirs;
  376. /***/ public String initFailedDirIsNoDirectory;
  377. /***/ public String initFailedGitDirIsNoDirectory;
  378. /***/ public String initFailedNonBareRepoSameDirs;
  379. /***/ public String inMemoryBufferLimitExceeded;
  380. /***/ public String inputDidntMatchLength;
  381. /***/ public String inputStreamMustSupportMark;
  382. /***/ public String integerValueOutOfRange;
  383. /***/ public String internalRevisionError;
  384. /***/ public String internalServerError;
  385. /***/ public String interruptedWriting;
  386. /***/ public String inTheFuture;
  387. /***/ public String invalidAdvertisementOf;
  388. /***/ public String invalidAncestryLength;
  389. /***/ public String invalidBooleanValue;
  390. /***/ public String invalidChannel;
  391. /***/ public String invalidCharacterInBase64Data;
  392. /***/ public String invalidCommitParentNumber;
  393. /***/ public String invalidDepth;
  394. /***/ public String invalidEncryption;
  395. /***/ public String invalidExpandWildcard;
  396. /***/ public String invalidGitdirRef;
  397. /***/ public String invalidGitType;
  398. /***/ public String invalidId;
  399. /***/ public String invalidId0;
  400. /***/ public String invalidIdLength;
  401. /***/ public String invalidIgnoreParamSubmodule;
  402. /***/ public String invalidIgnoreRule;
  403. /***/ public String invalidIntegerValue;
  404. /***/ public String invalidKey;
  405. /***/ public String invalidLineInConfigFile;
  406. /***/ public String invalidModeFor;
  407. /***/ public String invalidModeForPath;
  408. /***/ public String invalidObject;
  409. /***/ public String invalidOldIdSent;
  410. /***/ public String invalidPacketLineHeader;
  411. /***/ public String invalidPath;
  412. /***/ public String invalidPathContainsSeparator;
  413. /***/ public String invalidPathPeriodAtEndWindows;
  414. /***/ public String invalidPathSpaceAtEndWindows;
  415. /***/ public String invalidPathReservedOnWindows;
  416. /***/ public String invalidReflogRevision;
  417. /***/ public String invalidRefName;
  418. /***/ public String invalidRemote;
  419. /***/ public String invalidShallowObject;
  420. /***/ public String invalidStageForPath;
  421. /***/ public String invalidTagOption;
  422. /***/ public String invalidTimeout;
  423. /***/ public String invalidTimeUnitValue2;
  424. /***/ public String invalidTimeUnitValue3;
  425. /***/ public String invalidTreeZeroLengthName;
  426. /***/ public String invalidURL;
  427. /***/ public String invalidWildcards;
  428. /***/ public String invalidRefSpec;
  429. /***/ public String invalidRepositoryStateNoHead;
  430. /***/ public String invalidWindowSize;
  431. /***/ public String isAStaticFlagAndHasNorevWalkInstance;
  432. /***/ public String JRELacksMD5Implementation;
  433. /***/ public String kNotInRange;
  434. /***/ public String largeObjectExceedsByteArray;
  435. /***/ public String largeObjectExceedsLimit;
  436. /***/ public String largeObjectException;
  437. /***/ public String largeObjectOutOfMemory;
  438. /***/ public String lengthExceedsMaximumArraySize;
  439. /***/ public String listingAlternates;
  440. /***/ public String listingPacks;
  441. /***/ public String localObjectsIncomplete;
  442. /***/ public String localRefIsMissingObjects;
  443. /***/ public String localRepository;
  444. /***/ public String lockCountMustBeGreaterOrEqual1;
  445. /***/ public String lockError;
  446. /***/ public String lockOnNotClosed;
  447. /***/ public String lockOnNotHeld;
  448. /***/ public String malformedpersonIdentString;
  449. /***/ public String maxCountMustBeNonNegative;
  450. /***/ public String mergeConflictOnNonNoteEntries;
  451. /***/ public String mergeConflictOnNotes;
  452. /***/ public String mergeStrategyAlreadyExistsAsDefault;
  453. /***/ public String mergeStrategyDoesNotSupportHeads;
  454. /***/ public String mergeUsingStrategyResultedInDescription;
  455. /***/ public String mergeRecursiveConflictsWhenMergingCommonAncestors;
  456. /***/ public String mergeRecursiveReturnedNoCommit;
  457. /***/ public String mergeRecursiveTooManyMergeBasesFor;
  458. /***/ public String messageAndTaggerNotAllowedInUnannotatedTags;
  459. /***/ public String minutesAgo;
  460. /***/ public String missingAccesskey;
  461. /***/ public String missingConfigurationForKey;
  462. /***/ public String missingDeltaBase;
  463. /***/ public String missingForwardImageInGITBinaryPatch;
  464. /***/ public String missingObject;
  465. /***/ public String missingPrerequisiteCommits;
  466. /***/ public String missingRequiredParameter;
  467. /***/ public String missingSecretkey;
  468. /***/ public String mixedStagesNotAllowed;
  469. /***/ public String mkDirFailed;
  470. /***/ public String mkDirsFailed;
  471. /***/ public String month;
  472. /***/ public String months;
  473. /***/ public String monthsAgo;
  474. /***/ public String multipleMergeBasesFor;
  475. /***/ public String need2Arguments;
  476. /***/ public String needPackOut;
  477. /***/ public String needsAtLeastOneEntry;
  478. /***/ public String needsWorkdir;
  479. /***/ public String newlineInQuotesNotAllowed;
  480. /***/ public String noApplyInDelete;
  481. /***/ public String noClosingBracket;
  482. /***/ public String noCredentialsProvider;
  483. /***/ public String noHEADExistsAndNoExplicitStartingRevisionWasSpecified;
  484. /***/ public String noHMACsupport;
  485. /***/ public String noMergeBase;
  486. /***/ public String noMergeHeadSpecified;
  487. /***/ public String noSuchRef;
  488. /***/ public String notABoolean;
  489. /***/ public String notABundle;
  490. /***/ public String notADIRCFile;
  491. /***/ public String notAGitDirectory;
  492. /***/ public String notAPACKFile;
  493. /***/ public String notARef;
  494. /***/ public String notASCIIString;
  495. /***/ public String notAuthorized;
  496. /***/ public String notAValidPack;
  497. /***/ public String notFound;
  498. /***/ public String nothingToFetch;
  499. /***/ public String nothingToPush;
  500. /***/ public String notMergedExceptionMessage;
  501. /***/ public String noXMLParserAvailable;
  502. /***/ public String objectAtHasBadZlibStream;
  503. /***/ public String objectAtPathDoesNotHaveId;
  504. /***/ public String objectIsCorrupt;
  505. /***/ public String objectIsCorrupt3;
  506. /***/ public String objectIsNotA;
  507. /***/ public String objectNotFound;
  508. /***/ public String objectNotFoundIn;
  509. /***/ public String obtainingCommitsForCherryPick;
  510. /***/ public String offsetWrittenDeltaBaseForObjectNotFoundInAPack;
  511. /***/ public String onlyAlreadyUpToDateAndFastForwardMergesAreAvailable;
  512. /***/ public String onlyOneFetchSupported;
  513. /***/ public String onlyOneOperationCallPerConnectionIsSupported;
  514. /***/ public String openFilesMustBeAtLeast1;
  515. /***/ public String openingConnection;
  516. /***/ public String operationCanceled;
  517. /***/ public String outputHasAlreadyBeenStarted;
  518. /***/ public String packChecksumMismatch;
  519. /***/ public String packCorruptedWhileWritingToFilesystem;
  520. /***/ public String packDoesNotMatchIndex;
  521. /***/ public String packedRefsHandleIsStale;
  522. /***/ public String packetSizeMustBeAtLeast;
  523. /***/ public String packetSizeMustBeAtMost;
  524. /***/ public String packedRefsCorruptionDetected;
  525. /***/ public String packfileCorruptionDetected;
  526. /***/ public String packFileInvalid;
  527. /***/ public String packfileIsTruncated;
  528. /***/ public String packfileIsTruncatedNoParam;
  529. /***/ public String packHandleIsStale;
  530. /***/ public String packHasUnresolvedDeltas;
  531. /***/ public String packInaccessible;
  532. /***/ public String packingCancelledDuringObjectsWriting;
  533. /***/ public String packObjectCountMismatch;
  534. /***/ public String packRefs;
  535. /***/ public String packSizeNotSetYet;
  536. /***/ public String packTooLargeForIndexVersion1;
  537. /***/ public String packWasDeleted;
  538. /***/ public String packWriterStatistics;
  539. /***/ public String panicCantRenameIndexFile;
  540. /***/ public String patchApplyException;
  541. /***/ public String patchFormatException;
  542. /***/ public String pathIsNotInWorkingDir;
  543. /***/ public String pathNotConfigured;
  544. /***/ public String peeledLineBeforeRef;
  545. /***/ public String peerDidNotSupplyACompleteObjectGraph;
  546. /***/ public String personIdentEmailNonNull;
  547. /***/ public String personIdentNameNonNull;
  548. /***/ public String prefixRemote;
  549. /***/ public String problemWithResolvingPushRefSpecsLocally;
  550. /***/ public String progressMonUploading;
  551. /***/ public String propertyIsAlreadyNonNull;
  552. /***/ public String pruneLoosePackedObjects;
  553. /***/ public String pruneLooseUnreferencedObjects;
  554. /***/ public String pullOnRepoWithoutHEADCurrentlyNotSupported;
  555. /***/ public String pullTaskName;
  556. /***/ public String pushCancelled;
  557. /***/ public String pushCertificateInvalidField;
  558. /***/ public String pushCertificateInvalidFieldValue;
  559. /***/ public String pushCertificateInvalidHeader;
  560. /***/ public String pushCertificateInvalidSignature;
  561. /***/ public String pushIsNotSupportedForBundleTransport;
  562. /***/ public String pushNotPermitted;
  563. /***/ public String pushOptionsNotSupported;
  564. /***/ public String rawLogMessageDoesNotParseAsLogEntry;
  565. /***/ public String readerIsRequired;
  566. /***/ public String readingObjectsFromLocalRepositoryFailed;
  567. /***/ public String readTimedOut;
  568. /***/ public String receivePackObjectTooLarge1;
  569. /***/ public String receivePackObjectTooLarge2;
  570. /***/ public String receivePackInvalidLimit;
  571. /***/ public String receivePackTooLarge;
  572. /***/ public String receivingObjects;
  573. /***/ public String refAlreadyExists;
  574. /***/ public String refAlreadyExists1;
  575. /***/ public String reflogEntryNotFound;
  576. /***/ public String refNotResolved;
  577. /***/ public String refUpdateReturnCodeWas;
  578. /***/ public String remoteConfigHasNoURIAssociated;
  579. /***/ public String remoteDoesNotHaveSpec;
  580. /***/ public String remoteDoesNotSupportSmartHTTPPush;
  581. /***/ public String remoteHungUpUnexpectedly;
  582. /***/ public String remoteNameCantBeNull;
  583. /***/ public String renameBranchFailedBecauseTag;
  584. /***/ public String renameBranchFailedUnknownReason;
  585. /***/ public String renameBranchUnexpectedResult;
  586. /***/ public String renameFileFailed;
  587. /***/ public String renamesAlreadyFound;
  588. /***/ public String renamesBreakingModifies;
  589. /***/ public String renamesFindingByContent;
  590. /***/ public String renamesFindingExact;
  591. /***/ public String renamesRejoiningModifies;
  592. /***/ public String repositoryAlreadyExists;
  593. /***/ public String repositoryConfigFileInvalid;
  594. /***/ public String repositoryNotFound;
  595. /***/ public String repositoryState_applyMailbox;
  596. /***/ public String repositoryState_bare;
  597. /***/ public String repositoryState_bisecting;
  598. /***/ public String repositoryState_conflicts;
  599. /***/ public String repositoryState_merged;
  600. /***/ public String repositoryState_normal;
  601. /***/ public String repositoryState_rebase;
  602. /***/ public String repositoryState_rebaseInteractive;
  603. /***/ public String repositoryState_rebaseOrApplyMailbox;
  604. /***/ public String repositoryState_rebaseWithMerge;
  605. /***/ public String requiredHashFunctionNotAvailable;
  606. /***/ public String resettingHead;
  607. /***/ public String resolvingDeltas;
  608. /***/ public String resultLengthIncorrect;
  609. /***/ public String rewinding;
  610. /***/ public String s3ActionDeletion;
  611. /***/ public String s3ActionReading;
  612. /***/ public String s3ActionWriting;
  613. /***/ public String searchForReuse;
  614. /***/ public String searchForSizes;
  615. /***/ public String secondsAgo;
  616. /***/ public String selectingCommits;
  617. /***/ public String sequenceTooLargeForDiffAlgorithm;
  618. /***/ public String serviceNotEnabledNoName;
  619. /***/ public String serviceNotPermitted;
  620. /***/ public String shallowCommitsAlreadyInitialized;
  621. /***/ public String shallowPacksRequireDepthWalk;
  622. /***/ public String shortCompressedStreamAt;
  623. /***/ public String shortReadOfBlock;
  624. /***/ public String shortReadOfOptionalDIRCExtensionExpectedAnotherBytes;
  625. /***/ public String shortSkipOfBlock;
  626. /***/ public String signingNotSupportedOnTag;
  627. /***/ public String similarityScoreMustBeWithinBounds;
  628. /***/ public String sizeExceeds2GB;
  629. /***/ public String skipMustBeNonNegative;
  630. /***/ public String smartHTTPPushDisabled;
  631. /***/ public String sourceDestinationMustMatch;
  632. /***/ public String sourceIsNotAWildcard;
  633. /***/ public String sourceRefDoesntResolveToAnyObject;
  634. /***/ public String sourceRefNotSpecifiedForRefspec;
  635. /***/ public String squashCommitNotUpdatingHEAD;
  636. /***/ public String staleRevFlagsOn;
  637. /***/ public String startingReadStageWithoutWrittenRequestDataPendingIsNotSupported;
  638. /***/ public String stashApplyConflict;
  639. /***/ public String stashApplyConflictInIndex;
  640. /***/ public String stashApplyFailed;
  641. /***/ public String stashApplyWithoutHead;
  642. /***/ public String stashApplyOnUnsafeRepository;
  643. /***/ public String stashCommitIncorrectNumberOfParents;
  644. /***/ public String stashDropDeleteRefFailed;
  645. /***/ public String stashDropFailed;
  646. /***/ public String stashDropMissingReflog;
  647. /***/ public String stashFailed;
  648. /***/ public String stashResolveFailed;
  649. /***/ public String statelessRPCRequiresOptionToBeEnabled;
  650. /***/ public String storePushCertMultipleRefs;
  651. /***/ public String storePushCertOneRef;
  652. /***/ public String storePushCertReflog;
  653. /***/ public String submoduleExists;
  654. /***/ public String submodulesNotSupported;
  655. /***/ public String submoduleParentRemoteUrlInvalid;
  656. /***/ public String supportOnlyPackIndexVersion2;
  657. /***/ public String symlinkCannotBeWrittenAsTheLinkTarget;
  658. /***/ public String systemConfigFileInvalid;
  659. /***/ public String tagAlreadyExists;
  660. /***/ public String tagNameInvalid;
  661. /***/ public String tagOnRepoWithoutHEADCurrentlyNotSupported;
  662. /***/ public String transactionAborted;
  663. /***/ public String theFactoryMustNotBeNull;
  664. /***/ public String timeIsUncertain;
  665. /***/ public String timerAlreadyTerminated;
  666. /***/ public String tooManyIncludeRecursions;
  667. /***/ public String topologicalSortRequired;
  668. /***/ public String transportExceptionBadRef;
  669. /***/ public String transportExceptionEmptyRef;
  670. /***/ public String transportExceptionInvalid;
  671. /***/ public String transportExceptionMissingAssumed;
  672. /***/ public String transportExceptionReadRef;
  673. /***/ public String transportNeedsRepository;
  674. /***/ public String transportProtoAmazonS3;
  675. /***/ public String transportProtoBundleFile;
  676. /***/ public String transportProtoFTP;
  677. /***/ public String transportProtoGitAnon;
  678. /***/ public String transportProtoHTTP;
  679. /***/ public String transportProtoLocal;
  680. /***/ public String transportProtoSFTP;
  681. /***/ public String transportProtoSSH;
  682. /***/ public String transportProtoTest;
  683. /***/ public String transportProvidedRefWithNoObjectId;
  684. /***/ public String transportSSHRetryInterrupt;
  685. /***/ public String treeEntryAlreadyExists;
  686. /***/ public String treeFilterMarkerTooManyFilters;
  687. /***/ public String treeIteratorDoesNotSupportRemove;
  688. /***/ public String treeWalkMustHaveExactlyTwoTrees;
  689. /***/ public String truncatedHunkLinesMissingForAncestor;
  690. /***/ public String truncatedHunkNewLinesMissing;
  691. /***/ public String truncatedHunkOldLinesMissing;
  692. /***/ public String tSizeMustBeGreaterOrEqual1;
  693. /***/ public String unableToCheckConnectivity;
  694. /***/ public String unableToCreateNewObject;
  695. /***/ public String unableToStore;
  696. /***/ public String unableToWrite;
  697. /***/ public String unauthorized;
  698. /***/ public String unencodeableFile;
  699. /***/ public String unexpectedCompareResult;
  700. /***/ public String unexpectedEndOfConfigFile;
  701. /***/ public String unexpectedEndOfInput;
  702. /***/ public String unexpectedHunkTrailer;
  703. /***/ public String unexpectedOddResult;
  704. /***/ public String unexpectedRefReport;
  705. /***/ public String unexpectedReportLine;
  706. /***/ public String unexpectedReportLine2;
  707. /***/ public String unknownOrUnsupportedCommand;
  708. /***/ public String unknownDIRCVersion;
  709. /***/ public String unknownHost;
  710. /***/ public String unknownIndexVersionOrCorruptIndex;
  711. /***/ public String unknownObject;
  712. /***/ public String unknownObjectType;
  713. /***/ public String unknownObjectType2;
  714. /***/ public String unknownRepositoryFormat;
  715. /***/ public String unknownRepositoryFormat2;
  716. /***/ public String unknownZlibError;
  717. /***/ public String unmergedPath;
  718. /***/ public String unmergedPaths;
  719. /***/ public String unpackException;
  720. /***/ public String unreadablePackIndex;
  721. /***/ public String unrecognizedRef;
  722. /***/ public String unsetMark;
  723. /***/ public String unsupportedAlternates;
  724. /***/ public String unsupportedArchiveFormat;
  725. /***/ public String unsupportedCommand0;
  726. /***/ public String unsupportedEncryptionAlgorithm;
  727. /***/ public String unsupportedEncryptionVersion;
  728. /***/ public String unsupportedGC;
  729. /***/ public String unsupportedMark;
  730. /***/ public String unsupportedOperationNotAddAtEnd;
  731. /***/ public String unsupportedPackIndexVersion;
  732. /***/ public String unsupportedPackVersion;
  733. /***/ public String unsupportedRepositoryDescription;
  734. /***/ public String updatingHeadFailed;
  735. /***/ public String updatingReferences;
  736. /***/ public String updatingRefFailed;
  737. /***/ public String upstreamBranchName;
  738. /***/ public String uriNotConfigured;
  739. /***/ public String uriNotFound;
  740. /***/ public String URINotSupported;
  741. /***/ public String URLNotFound;
  742. /***/ public String userConfigFileInvalid;
  743. /***/ public String walkFailure;
  744. /***/ public String wantNotValid;
  745. /***/ public String weeksAgo;
  746. /***/ public String windowSizeMustBeLesserThanLimit;
  747. /***/ public String windowSizeMustBePowerOf2;
  748. /***/ public String writerAlreadyInitialized;
  749. /***/ public String writeTimedOut;
  750. /***/ public String writingNotPermitted;
  751. /***/ public String writingNotSupported;
  752. /***/ public String writingObjects;
  753. /***/ public String wrongDecompressedLength;
  754. /***/ public String wrongRepositoryState;
  755. /***/ public String year;
  756. /***/ public String years;
  757. /***/ public String years0MonthsAgo;
  758. /***/ public String yearsAgo;
  759. /***/ public String yearsMonthsAgo;
  760. }