aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src/org/eclipse/jgit
Commit message (Collapse)AuthorAgeFilesLines
* Use a dedicated executor to run auto-gc in command line interfaceMatthias Sohn2017-06-111-0/+19
| | | | | | | | WorkQueue uses daemon threads so auto-gc would not be executed after short-lived commands run in command line. Hence use a dedicated executor which we shutdown when the command finishes. Change-Id: I0c2429ecfa04387389d159168ba78a020a696228 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fetch: Add --recurse-submodules and --no-recurse-submodules optionsDavid Pursehouse2017-06-113-2/+49
| | | | | | | | | | Add options to control recursion into submodules on fetch. Add a callback interface on FetchCommand, to allow Fetch to display an update "Fetching submodule XYZ" for each submodule. Change-Id: Id805044b57289ee0f384b434aba1dbd2fd317e5b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* [findBugs] Use UTF-8 when writing to the error stream in jgit pgmMatthias Sohn2017-05-151-1/+4
| | | | Change-Id: Ic2555ea932dbbd1a3a6868e731f247b9754d7f09 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Clone: add --recurse-submodules optionDavid Pursehouse2017-04-272-3/+48
| | | | | | | | | | Add the --recurse-submodules option on the command, which causes submodules to also be initialized and updated. Add a callback interface on CloneCommand and SubmoduleUpdateCommand to them to provide progress feedback for clone operations. Change-Id: I41b1668bc0d0bdfa46a9a89882c9657ea3063fc1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* LfsProtocolServlet: Pass HTTP Authorization header to getLargeFileRepositoryDavid Pursehouse2017-03-081-1/+1
| | | | | | | | This allows implementations to reject operations that do not include proper authentication. Change-Id: If301476d8fb56a0899e424be3789c7576097d185 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Enable and fix warnings about redundant specification of type argumentsDavid Pursehouse2017-02-2023-51/+51
| | | | | | | | | | Since the introduction of generic type parameter inference in Java 7, it's not necessary to explicitly specify the type of generic parameters. Enable the warning in Eclipse, and fix all occurrences. Change-Id: I9158caf1beca5e4980b6240ac401f3868520aad0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Enable and fix 'Should be tagged with @Override' warningDavid Pursehouse2017-02-196-0/+11
| | | | | | | | | | | | | | | | | | | | | | | Set missingOverrideAnnotation=warning in Eclipse compiler preferences which enables the warning: The method <method> of type <type> should be tagged with @Override since it actually overrides a superclass method Justification for this warning is described in: http://stackoverflow.com/a/94411/381622 Enabling this causes in excess of 1000 warnings across the entire code-base. They are very easy to fix automatically with Eclipse's "Quick Fix" tool. Fix all of them except 2 which cause compilation failure when the project is built with mvn; add TODO comments on those for further investigation. Change-Id: I5772061041fd361fe93137fd8b0ad356e748a29c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Don't rely on default locale when using toUpperCase() and toLowerCase()Matthias Sohn2017-01-282-3/+6
| | | | | | | | | | | | | | | | Otherwise these methods may produce unexpected results if used for strings that are intended to be interpreted locale independently. Examples are programming language identifiers, protocol keys, and HTML tags. For instance, "TITLE".toLowerCase() in a Turkish locale returns "t\u0131tle", where '\u0131' is the LATIN SMALL LETTER DOTLESS I character. See https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#toLowerCase-- http://blog.thetaphi.de/2012/07/default-locales-default-charsets-and.html Bug: 511238 Change-Id: Id8d8f37d84d62239c918b81f8d883ed798d87656 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove @since tags from internal packagesJonathan Nieder2017-01-241-2/+0
| | | | | | | | | These packages don't use @since tags because they are not part of the stable public API. Some @since tags snuck in, though. Remove them to make the convention easier to find for new contributors and the expectations clearer for users. Change-Id: I6c17d3cfc93657f1b33cf5c5708f2b1c712b0d31
* gc: Add options to preserve and prune old pack filesJames Melvin2017-01-191-0/+8
| | | | | | | | | | | | | | | | | | | The new --preserve-oldpacks option moves old pack files into the preserved subdirectory instead of deleting them after repacking. The new --prune-preserved option prunes old pack files from the preserved subdirectory after repacking, but before potentially moving the latest old packfiles to this subdirectory. These options are designed to prevent stale file handle exceptions during git operations which can happen on users of NFS repos when repacking is done on them. The strategy is to preserve old pack files around until the next repack with the hopes that they will become unreferenced by then and not cause any exceptions to running processes when they are finally deleted (pruned). Change-Id: If3f729f0d9ce920ee2c3e6acdde46f2068be61d2 Signed-off-by: James Melvin <jmelvin@codeaurora.org>
* Organize importsDavid Pursehouse2016-11-1417-46/+43
| | | | | Change-Id: I7c545d06b1bced678c020fab9af1382bc4416b6e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* CheckoutCommand: Add method to add multiple pathsDavid Pursehouse2016-10-221-3/+1
| | | | | | | | The new method addPaths(List<String>) allows callers to add multiple paths without having to iterate over several calls to addPath(String). Change-Id: I2c3746a97ead7118fb0ed5543a2c843224719031 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Checkout: Add the ability to checkout all paths.Ned Twigg2016-10-221-2/+7
| | | | | | Change-Id: Ie1e59c566b63d0dfac231e44e7ebd7f3f08f3e9f Signed-off-by: Ned Twigg <ned.twigg@diffplug.com> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Main: Add missing $NON-NLS tagDavid Pursehouse2016-10-181-1/+1
| | | | | Change-Id: I030910b88a8f60ca174e38f0a213959f9b0a776f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Status: remove unused lineFormat memberDavid Pursehouse2016-10-181-2/+0
| | | | | Change-Id: I3c4d83583edb1a6e1fbee1ea496dcf93302831b3 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* LfsStore: Don't invoke toString on String variableDavid Pursehouse2016-10-181-1/+1
| | | | | Change-Id: I15d234e5d907d0bbb22a95cf781e915798bead30 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Fix JGit CLI to follow native git's interpretation of http_proxy...Christian Halstrick2016-10-141-5/+16
| | | | | | | | | | | | | | | | | Native git (as many other tools) interprets the environment variables http_proxy, HTTP_PROXY, ... in a specific way. "http_proxy" has to be lowercase while "https_proxy" can be lowercase or uppercase (means: "HTTPS_PROXY"). Lowercase has precedence. This can be looked up in "ENVIRONMENT" section of [1]. Teach JGit CLI to behave similar. Additionally teach JGit not to interpret the environment variables if the java process was explicitly started with the system properties telling JVM which proxy to use. A call like "http_proxy=proxy1 java -Dhttp.proxyHost=proxy2 ..." should use proxy2 as proxy. [1] https://curl.haxx.se/docs/manpage.html Change-Id: I2ad78f209792bf8f1285cf2f8ada8ae0c28f8e5a
* Merge branch 'stable-4.5'Matthias Sohn2016-10-112-2/+2
|\ | | | | | | | | | | | | | | | | | | * stable-4.5: pgm: Fix misspelled key of an externalized string Add missing online help for Ketch server type option in CLI daemon Remove wrong junit dependencies in org.eclipse.jgit.pgm Change-Id: I9cac024c0b488101b539c713b0f5ffc8c01b55bd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * pgm: Fix misspelled key of an externalized stringMatthias Sohn2016-10-021-1/+1
| | | | | | | | | | Bug: 502107 Change-Id: I76d0981c8463b63bd049f50cdc7d549fa0604b3c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Add missing online help for Ketch server type option in CLI daemonMatthias Sohn2016-10-021-1/+1
| | | | | | | | Change-Id: I19d27bbdbfdb1c7a5a688e41dfcba73a142a1afd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Add built-in LFS smudge filter for local caseChristian Halstrick2016-09-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Adds a JGit built-in implementation of the "git lfs smudge" filter. This filter should do the same as the one described in [1] besides that it only supports the local case when the lfs objects are already present in the media directory. Remote cases where download of LFS objects from an LFS server is needed will be done in a later commit. [1] https://github.com/github/git-lfs/blob/master/docs/man/git-lfs-smudge.1.ronn Change-Id: I8ff661d4edd3667ef7f86f3b4fa33e568eb4c8f4
* | Add built-in LFS clean filterChristian Halstrick2016-09-201-0/+2
|/ | | | | | | | | | | | Adds a JGit built-in implementation of the "git lfs clean" filter. This filter should do the same as the one described in [1]. But since this filter is written in Java and can be called by JGit without forking new processes it should be much faster [1] https://github.com/github/git-lfs/blob/master/docs/man/git-lfs-clean.1.ronn Change-Id: If60e387e97870245b4bd765eda6717eb84cffb1d
* CLI: implement option -d for deleting tagsNed Twigg2016-08-312-11/+24
| | | | | Change-Id: I438456b76aefd361384729686271288186d3be3b Signed-off-by: Ned Twigg <ned.twigg@diffplug.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Added a clean command.Ned Twigg2016-08-302-0/+88
| | | | | Change-Id: I05d5392789b5b64e6ee44f678556cf25dc30d7ba Signed-off-by: Ned Twigg <ned.twigg@diffplug.com>
* push: Do not use push options unless requestedStefan Beller2016-08-241-1/+3
| | | | | | | | | | | | | | | | Unless the user passed --push-option, the client does not intend to pass push options to the server. Without this change, all pushes to servers without push option support fail. Not enabling the feature (instead of enabling it and sending an empty list of options) in this case is more intuitive and matches the behavior of C git push's --push-option parameter better. Bug: 500149 Change-Id: Ia4f13840cc54d8ba54e99b1432108f1c43022c53 Signed-off-by: Stefan Beller <sbeller@google.com>
* LfsProtocolServlet: Pass request and path to getLargeFileRepositoryDavid Pursehouse2016-07-271-2/+2
| | | | | | | | | | | | Passing the request and path to the method will allow implementations to have more control over determination of the backend, for example: - return different backends for different requests - accept or refuse requests based on request characteristics - etc Change-Id: I1ec6ec54c91a5f0601b620ed18846eb4a3f46783 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Push implementation of option stringsDan Wang2016-07-221-0/+4
| | | | | | | | | | | | | Example usage: $ ./jgit push \ --push-option "Reviewer=j.doe@example.org" \ --push-option "<arbitrary string>" \ origin HEAD:refs/for/master Stefan Beller has also made an equivalent change to CGit: http://thread.gmane.org/gmane.comp.version-control.git/299872 Change-Id: I6797e50681054dce3bd179e80b731aef5e200d77 Signed-off-by: Dan Wang <dwwang@google.com>
* Replace use of deprecated method Repository.getRef()Matthias Sohn2016-05-315-9/+9
| | | | Change-Id: Iecf2b8deafc4991cc3333702fb9fa0638be7b914 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* RepoCommand: remove --record-remote-branchesStefan Beller2016-05-251-4/+0
| | | | | | | | This function only works in bare mode, and the command line works in non-bare mode, so there's no point in pretending to support it here. Change-Id: Ia017aded93d072bdb9947ec08c424256c3abe438 Signed-off-by: Stefan Beller <sbeller@google.com>
* JGit CLI: allow to call git init with specific directoryRüdiger Herrmann2016-05-221-1/+10
| | | | | | | | With this change it is possible to initialize repositories with 'git init /path/to/new/repo' Change-Id: Ia9b288b4fb34887e8f5e2f3f270e521c44d41b6a Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Redirect all Show output to outsRüdiger Herrmann2016-05-211-2/+8
| | | | | | | | The Show command wrote all diffs to System.out instead of 'outs. Bug: 494143 Change-Id: Ibc78e9a058b7a32d536e03e294c1d933b6c26ba7 Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix RebuildRefTree trying to add HEAD twice to RefTreeMatthias Sohn2016-03-051-1/+1
| | | | | | | | | | | | | | | | | | | 14dfa70520 fixed the problem that HEAD wasn't added to the reftree when rebuilding the reftree in an empty repository where HEAD isn't yet resolvable. Since non-resolvable refs are filtered out by RefDatabase.getRefs(ALL) we have to add HEAD to the reftree explicitly in this special case. This fix resulted in another bug: rebuilding the reftree in a repository which has a resolvable HEAD failed with a DirCacheNameConflictException in RefTree.apply(). If HEAD is resolvable RefDatabase.getRefs(ALL) does not filter out HEAD. This results in two identical CREATE commands for HEAD which RefTree.apply() refuses to execute. Fix this by no longer creating a duplicate CREATE command for HEAD. See: I46cbc2611b9ae683ef7319dc46af277925dfaee5 Change-Id: I58dd6bcdef88820aa7de29761d43e2edfa18fcbe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix help text for option --enable of command debug-rebuild-ref-treeMatthias Sohn2016-03-011-1/+1
| | | | | | | This fixes a MissingResourceException thrown when executing jgit debug-rebuild-ref-tree --help Change-Id: I637ea55084a913f5105ebf4cf2baef8b81877938 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Support Amazon S3 based storage for LFSMatthias Sohn2016-02-172-8/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a storage implementation storing large objects in Amazon S3. The AmazonS3Repository pre-signs download and upload requests. AWS access and secret key are expected to be in the $HOME/.aws/credentials file in the following format: [default] accessKey = ... secretKey = ... Use AWS version 4 request signing [1] because it is more secure and supported by all regions. The version 3 signing is not supported in newer regions. In follow up changes we should: - implement getVerifyAction() and do actual verification. Subclasses of S3Repository can implement caching for object meta data (size) in order to avoid extra roundtrips to S3. Verification should ensure that meta data store and content of S3 storage are in sync - HEAD request used in S3Repository.getSize() seems to always return Content-length 0 in contrast to the documentation [2]. So getSize() does detect if the object exists in S3 or not but in case the object exists it always returns size 0 [1] http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html [2] https://forums.aws.amazon.com/thread.jspa?threadID=223616 Change-Id: Ic47f094928a259e5264c92b3aacf6d90210907a8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
* Merge branch 'stable-4.2'Matthias Sohn2016-02-152-13/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.2: Don't use deprecated LockFile constructor Fix warnings about unchecked conversion of MergeResult MockServletConfig: Fix warning about unchecked conversion of Enumeration HugeFileTest: Make Git a class member and open in try-with-resource Suppress "unchecked cast" warnings related to UploadPackFactory.DISABLED DiffAlgorithms: Fix warnings about variable hiding DirCacheBasicTest: Open ObjectInserter.Formatter in try-with-resource DirCacheBuilderIteratorTest: Open TreeWalk in try-with-resource DirCacheCGitCompatabilityTest: Open TreeWalk in try-with-resource DirCacheCheckoutMaliciousPathTest: Open Git and RevWalk in t-w-r DirCacheIteratorTest: Open TreeWalk instances in try-with-resource ForPathTest: Open TreeWalk in try-with-resource GitConstructionTest: Open Git instance in try-with-resource IndexDiffTest: Open Git instances in try-with-resources ManifestParserTest: Don't use deprecated StringBufferInputStream InMemoryRepository: Remove unused RevWalk from batch method signature IndexModificationTimesTest: Open Git instances in try-with-resource InterIndexDiffFilterTest: Open TreeWalk in try-with-resource LockFileTest: Open Git instance in try-with-resource JGit v4.1.2.201602141800-r MergeCommandTest: Use JUnit's assume to check preconditions MergeCommandTest: Open Git instances in try-with-resource Change-Id: Ie5dba6b9132a29e86958a04fa2b76465bcd2c6b5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Don't use deprecated LockFile constructorDavid Pursehouse2016-02-151-2/+2
| | | | | | | | | | Change-Id: Ibc3e2f3372e1a65732dd6d3c71cec53fb1aa15e2 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * DiffAlgorithms: Fix warnings about variable hidingDavid Pursehouse2016-02-151-11/+12
| | | | | | | | | | | | | | | | Local variables/parameters named 'db' and 'cmp' were hiding class member variables of the same name. Change-Id: I98b770587aaf73744a93e6a3ee33d131a9fa91e9 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
* | Merge branch 'stable-4.2'Matthias Sohn2016-02-101-7/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.2: RepoProject: Fix warnings about variable hiding RepoTest: Open Git in try-with-resources RepositoryResolveTest: Open Git in try-with-resource RepositoryTestCase: Open autocloseable types in try-with-resource ResetCommandTest: Use Git member in testHardResetAfterSquashMerge ResolveMergerTest: Open Git in try-with-resource RevCommitListTest: Open Git and RevWalk in try-with-resource RevCommitParseTest: Open ObjectInserter.Formatter in try-with-resource RevObjectTest: Open RevWalk in try-with-resource RevTagParseTest: Open ObjectInserter.Formatter in try-with-resource RevertCommandTest: Open Git in try-with-resource SquashMessageFormatterTest: Open git in try-with-resource StatusCommandTest: Open Git in try-with-resource SubmoduleAddTest: Open Git in try-with-resource SymlinksTest: Open git and TreeWalk in try-with-resource T0003_BasicTest: Open autocloseable types in try-with-resource TextHashFunctions: Fix warnings about variable hiding TreeFilterTest: Open TreeWalk in try-with-resource TreeWalkJava7Test: Open TreeWalk in try-with-resource Fix diff for added and removed submodule Change-Id: If3ecc63f6dfac55474d3c1dd2f4105371f3d24fb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * TextHashFunctions: Fix warnings about variable hidingDavid Pursehouse2016-02-051-7/+7
| | | | | | | | | | | | | | | | The local variables/arguments named 'db' were hiding the member variable of the same name in the superclass TextBuiltin. Change-Id: Ic49dcb7cc2a1b3fb46ad78450042c8c8fb464a80 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
* | Support LFS protocol and a file system based LFS storageMatthias Sohn2016-02-041-0/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement LfsProtocolServlet handling the "Git LFS v1 Batch API" protocol [1]. Add a simple file system based LFS content store and the debug-lfs-store command to simplify testing. Introduce a LargeFileRepository interface to enable additional storage implementation while reusing the same protocol implementation. At the client side we have to configure the lfs.url, specify that we use the batch API and we don't use authentication: [lfs] url = http://host:port/lfs batch = true [lfs "http://host:port/lfs"] access = none the git-lfs client appends the "objects/batch" to the lfs.url. Hard code an Authorization header in the FileLfsRepository.getAction because then git-lfs client will skip asking for credentials. It will just forward the Authorization header from the response to the download/upload request. The FileLfsServlet supports file content storage for "Large File Storage" (LFS) server as defined by the Github LFS API [2]. - upload and download of large files is probably network bound hence use an asynchronous servlet for good scalability - simple object storage in file system with 2 level fan-out - use LockFile to protect writing large objects against multiple concurrent uploads of the same object - to prevent corrupt uploads the uploaded file is rejected if its hash doesn't match id given in URL The debug-lfs-store command is used to run the LfsProtocolServlet and, optionally, the FileLfsServlet which makes it easier to setup a local test server. [1] https://github.com/github/git-lfs/blob/master/docs/api/http-v1-batch.md [2] https://github.com/github/git-lfs/tree/master/docs/api Bug: 472961 Change-Id: I7378da5575159d2195138d799704880c5c82d5f3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
* | Merge branch 'stable-4.2'Matthias Sohn2016-02-031-8/+8
|\| | | | | | | | | | | | | | | | | | | | | | | * stable-4.2: DirCacheCheckoutTest: Open Git and TreeWalk in try-with-resource CommitCommand: Remove declaration of unthrown exception Branch: Fix variable hiding warning ApplyCommandTest: Open Git in try-with-resource PackFileTest: Open ObjectInserter.Formatter in try-with-resource Change-Id: I8484b10fad5a4c35fcfaedc1cdf8ccf97471618e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Branch: Fix variable hiding warningDavid Pursehouse2016-02-021-8/+8
| | | | | | | | | | | | | | | | The Branch class has a member named 'branch', which was being hidden by the local variable of the same name used in a for-loop. Change-Id: I334092010a9c80686fb79713852d4bfa166ce12f Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
* | Merge changes from topic 'reftree'Shawn Pearce2016-01-211-4/+27
|\ \ | | | | | | | | | | | | | | | | | | | | | * changes: debug-rebuild-ref-tree: Copy HEAD into RefTree debug-rebuild-ref-tree: Add --enable flag to turn the database on RefTreeDatabase: Allow ORIG_HEAD, etc. on non-bare repositories RefTreeDatabase: Expose bootstrap refs in getAdditionalRefs
| * | debug-rebuild-ref-tree: Copy HEAD into RefTreeShawn Pearce2016-01-151-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HEAD is not part of getRefs(ALL) and must be copied explicitly. This allows `jgit debug-rebuild-ref-tree --enable` to convert an existing repository to use RefTree with a local working tree: mkdir testRepo cd testRepo jgit init jgit debug-rebuild-ref-tree --enable touch a jgit add a jgit commit -m initial Change-Id: I46cbc2611b9ae683ef7319dc46af277925dfaee5
| * | debug-rebuild-ref-tree: Add --enable flag to turn the database onShawn Pearce2016-01-151-0/+14
| | | | | | | | | | | | Change-Id: Iad8ebdb0c4c0ad6dcd2b12dd56ffe1be6a20840f
* | | daemon: Add --ketch=LEADER flagShawn Pearce2016-01-191-1/+46
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Experimental flag to turn on the KetchLeader within this daemon JVM. This is a manually elected leader process, set from the command line. Remote followers for each repository are configured per-repository using remote sections with ketch-type = FULL. For example: Manually elected leader's $GIT_DIR/config: [ketch] name = A [remote "A"] ketch-type = FULL [remote "B"] url = git://127.0.0.1:9421/sample.git ketch-type = FULL [remote "C"] url = git://127.0.0.1:9422/sample.git ketch-type = FULL Replica B and C daemons: git daemon \ --export-all \ --enable=receive-pack \ --listen=127.0.0.1 --port=9421 \ --base-path=$HOME/ketch_test/follower_one \ $HOME/ketch_test/follower_one & git daemon \ --export-all \ --enable=receive-pack \ --listen=127.0.0.1 --port=9422 \ --base-path=$HOME/ketch_test/follower_two \ $HOME/ketch_test/follower_two & Change-Id: I165f85970a77e16b5263115290d685d8a00566f5
* | Merge branch 'stable-4.2'David Pursehouse2016-01-2015-63/+70
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.2: CheckoutCommandTest: Create Git instances in try-with-resource BranchCommandTest: Create Git instances in try-with-resource CheckoutTest: Create Git instances in try-with-resource BranchTest: Create Git instances in try-with-resource URIishTest: Use @Test annotation's `expected` argument Suppress "The allocated object is never used" warning in tests Add $NON-NLS to suppress "Non-externalized string literal" warnings Don't use deprecated constructors of CmdLineException Prepare 4.2.0-SNAPSHOT builds Remove org.eclipse.jgit.updatesite project from tools/version.sh RevParse: Remove superfluous semicolon RefUpdateTest: Use try-with-resource for auto-closable types RefUpdateTest: Add null check to prevent potential NPE CommitCommand: Remove redundant null check JGit v4.2.0.201512141825-rc1 Change-Id: I2179859289b2f2e3d0b7c6d02ef7e7890c467f7b Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * Add $NON-NLS to suppress "Non-externalized string literal" warningsDavid Pursehouse2016-01-199-40/+40
| | | | | | | | | | Change-Id: I3e6f83ad2bc7d493e2c1ab5a8c60affa2b49c386 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * Don't use deprecated constructors of CmdLineExceptionDavid Pursehouse2016-01-196-22/+29
| | | | | | | | | | Change-Id: If01fa896537209821d6a7a262ee978572195a397 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * RevParse: Remove superfluous semicolonDavid Pursehouse2016-01-141-1/+1
| | | | | | | | | | Change-Id: I5975bc58d7933dafb3e7a8d891e9f6878b98a9a1 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>