IP Log for technology.jgit

Licenses

  • Eclipse Distribution License v1.0

Third-Party Code

Pre-Req Dependencies

CQThird-Party CodeLicenseUse
3454args4j Version: 2.0.12BSD Licenseunmodified binary
3565Java Servlet API Version: 2.5 (PB CQ2075)Apache License, 2.0unmodified binary
3654JSch Version: 0.1.41 (PB CQ3040)New BSD licenseunmodified binary
3655Junit Version: 3.8.2 (PB CQ2206)Common Public License 1.0unmodified binary
3886Apache SSHD Version: 0.3.0 (Subset)Apache License, 2.0, New BSD license, MIT licenseunmodified source & binary
3904jsch Version: 0.1.37 (using Orbit CQ2002)New BSD licenseunmodified source & binary
4564cassandra Version: 0.7.0-beta2Apache License, 2.0unmodified source & binary
4728jsch Version: 0.1.44New BSD licenseunmodified source & binary
4794hector Version: 0.7.0-22 (*Including Changed Commit one file)MIT Licenseunmodified source & binary
4871Apache Cassandra Version: 0.7.0 (PB 4816)Apache License, 2.0unmodified source & binary
4872High Scale Lib Version: 1.1.2 (PB Orbit CQ4821)Public Domainunmodified source & binary
4873Apache Thrift Java Library Version: 0.5 (PB 4818)Apache License, 2.0unmodified source & binary
4876Protocol Buffers Version: 2.4.0aNew BSD licenseunmodified source & binary
4893Apache Zookeeper Version: 3.3.2Apache License, 2.0unmodified source & binary
4895Google Guava Version: r08Apache License, 2.0unmodified source & binary
4896Apache Commons Logging Jar Version: 1.1.1 (PB Orbit CQ1907)Apache License, 2.0unmodified source & binary
4897log4j Version: 1.2.16 *Subset*Apache License, 2.0unmodified source & binary
5111Apache Ant Version: 1.8.2 (PB Orbit CQ4726)Apache License, 2.0unmodified source & binary

Exempt Pre-Req and Works With Dependencies

CQThird-Party CodeLicenseType
4894hbase Version: 0.90.0Apache License, 2.0works with

Unused Approved Contributions

CQThird-Party CodeLicenseStatus
4563hector Version: 0.7.0-18MIT licenseobsolete: was used in the past but is not longer used
4565perf4j Version: 0.9.13Apache License, 2.0unused: not currently in use, but may be used in a future release
4566Java UUID Generator (JUG) 3.1.0Apache License, 2.0unused: not currently in use, but may be used in a future release
4875Apache Avro Version: 1.4.1 (Subset Java Only)Apache License, 2.0unused: not currently in use, but may be used in a future release
6467Glassfish servlet-api Version: 3.1-b33 (PB Orbit CQ5018)CDDL, Apache 2.0unused: not currently in use, but may be used in a future release

Pending Contribution Questionnaires

CQThird-Party CodeLicenseUse
5136bcprov-jdk16 Version: 1.46unmodified source & binary

Committers

Past and Present Active
Name Organization  
Chris Aniszczyk
Christian Halstrick SAP AG
Mathias Kinzler SAP AG
Stefan Lay SAP AG
Shawn Pearce Google Inc.
Robin Rosenberg
Kevin Sawicki GitHub
Matthias Sohn SAP AG
Sasa Zivkov SAP AG

Never Active
Name Organization  
Gunnar Wagenknecht AGETO Service GmbH

Contributors and Their Contributions

Ref Size Description
Abhishek Bhatnagar (redhat.com)
08f0e1 123 lines Add CleanCommand to JGit API Bug 334767 Change-Id: I2650c77bc4af2d8f401bbcce5384b44ff2a64ba2 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
7d380e 127 lines Add CleanCommandTest and fix CleanCommand Bug 334767 Change-Id: I0a836451ceb668f943b1f353dc65420157810b23 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
b04be9 35 lines CleanCommand: add the ability to do a dry run Change-Id: I7b81a7e34a771951e2e7b789b080b2bfb8656e5c Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Adrian Goerler (sap.com)
172a9f 48 lines Cloning should fail when destination directory exists and is not empty When trying to clone into a folder that already contains a cloned repository native git will fail with a message "fatal: destination path 'folder' already exists and is not an empty directory.". Now JGit will also fail in this situation throwing a JGitInternalException. The test case was provided by Tomasz Zarna. Bug 347852 Change-Id: If9e9919a5f92d13cf038dc470c21ee5967322dac Also-by: Tomasz Zarna <Tomasz.Zarna@pl.ibm.com> Signed-off-by: Adrian Goerler <adrian.goerler@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2062d6 25 lines Cleanup curly braces Change-Id: I2de6439a3ad951a99d89e4aee02006c745d16510 Signed-off-by: Adrian Goerler <adrian.goerler@sap.com>
ad74bb 76 lines Cleanup directories leftover by test. Use the temporary file management from superclass. Change-Id: I3042951dc21860b4b85dd72a6bf41ee7cfe2aba4 Signed-off-by: Adrian Goerler <adrian.goerler@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Alex Blewitt (gmail.com)
4d9164 1304 lines Remove trailing whitespace at end of line As discussed on the egit-dev mailing list, we prefer not to have trailing whitespace in our source code. Correct all currently offending lines by trimming them. Change-Id: I002b1d1980071084c0bc53242c8f5900970e6845 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Anatol Pomozov (gmail.com)
74419e 3 lines Bump jsch to 0.1.44 It fixes 'Corrupted MAC on input' ssh issue. CQ: 4728 Change-Id: I7de63cb3482488ac938566706edebee8a1cdad3a Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Andrew Bayer (gmail.com)
068eb9 43 lines Make ObjectId, RefSpec, RemoteConfig, URIish serializable Modifications to various classes in order to allow serialization for use of JGit in Hudson's git plugin. Change-Id: If088717d3da7483538c00a927e433a74085ae9e6
Benjamin Muskalla (eclipsesource.com)
700b8b 2 lines Fixed typo in DirCache documentation Change-Id: Ifc2e9047a45d57829fce59c66618e5de9120a5bb Signed-off-by: Benjamin Muskalla <bmuskalla@eclipsesource.com>
d08be7 5 lines Allow version builtin to run without git repository The version builtin should be able to run without a git directory to call it from wherever you want. Change-Id: I1a3bce662e6788b860a275ee50315af8d5cc094a Signed-off-by: Benjamin Muskalla <bmuskalla@eclipsesource.com>
Bernard Leach (bouncycastle.org)
1a867d 63 lines Added support to IndexDiff to return information on conflicts Change-Id: I43c13eb72a44f80135c93525fce0c0280b0e64a2 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
298486 98 lines IndexDiff: conflicting files aren't properly shown Before this change any files in the conflicting set would also be listed in the the other IndexDiff Sets which is confusing. With this change a conflicting file will not be included in any of the other sets. Change-Id: Ife9f2652685220bcfddc1f9820423acdcd5acfdc Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
37fe09 162 lines Add reset with paths support to ResetCommand Bug 338701 Change-Id: Id7cbce47131b459e632ddc2c9a94628c7d0b75cd Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
5ec497 54 lines Create a MergeResult for deleted/modified files Change Ia2ab4f8dc95020f2914ff01c2bf3b1bc62a9d45d added merge support for when OURS or THEIRS was simultaneously deleted and modified. That changeset however did not add create an entry in the conflicts table so clients would see a CONFLICTING result but getConflicts() would return null. This change creates a MergeResult for the conflicting file. Bug 345684 Change-Id: I52acb81c1729b49c9fb3e7a477c6448d8e55c317 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
98b019 88 lines Implemented merge for parallel delete/modification Duplicates cgit behaviour for merging the case where OURS is deleted and THEIRS is modified as well as OURS is modified and THEIRS id deleted. Change-Id: Ia2ab4f8dc95020f2914ff01c2bf3b1bc62a9d45d Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
cf846c 52 lines Remove rebase temporary files on checkout failure A checkout conflict during rebase setup should leave the repository in SAFE state which means ensuring that the rebase temporary files need to be removed. Bug 346813 Change-Id: If8b758fde73ed5a452a99a195a844825a03bae1a Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
e3c461 171 lines Add tests for change If203ce5 Bug 344779 Change-Id: I1628984479d93665bf4987d6a4ff8e67ad73eb36 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Carl Myers (palantir.com)
85a9ab 13 lines Fix NPE when PATH environment variable is empty Change-Id: Ic27d509cd5e2d6c855e7d355fc308399d9dc01c9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Carsten Pfeiffer (gebit.de)
11e2e7 47 lines Support reading first SHA-1 from large FETCH_HEAD files When reading refs, avoid reading huge files that were put there accidentally, but still read the top of e.g. FETCH_HEAD, which may be longer than our limit. We're only interested in the first line anyway. Bug 340880 Change-Id: I11029b9b443f22019bf80bd3dd942b48b531bc11 Signed-off-by: Carsten Pfieffer <carsten.pfeiffer@gebit.de> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
461109 4 lines Fix compilation with Java 1.5 Change-Id: I785f59fcf2018cd923d4d1617b923049dbde9809
486e22 16 lines Use the stored password instead of prompting for it all the time EGit change Iba3b87293c22e5fe7d989fc312184aa7463c4387 is also required to make this work for EGit. Change-Id: Iedc80e133e66d72e78ff0980b6e12634f75eca36 Signed-off-by: Carsten Pfeiffer <carsten.pfeiffer@gebit.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
92752f 113 lines [blame] Fix blame following renames in non-toplevel directories Mark the treeWalk as recursive; otherwise following renames only works for toplevel files. Bug 302549 Change-Id: I70867928eadf332b0942f8bf6877a3acb3828c87 Signed-off-by: Carsten Pfeiffer <carsten.pfeiffer@gebit.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Chris Aniszczyk <zx@twitter.com>
98d4bd 271 lines Allow detecting which files were renamed during a revwalk The egit history view shows the files associated with a commit by using a PathFilter. When following renames with a FollowFilter, the PathFilter cannot be configured anymore because the affected files are simply not known. Thus, it should be possible to get to know which files are renamed. Bug 302549 Change-Id: I4761e9f5cfb4f0ef0b0e1e38991401a1d5003bea
Charley Wang (redhat.com)
b878cd 1619 lines Add compatibility with gitignore specifications This patch adds ignore compatibility to jgit. It encompasses exclude files as well as .gitignore. Uses TreeWalk and FileTreeIterator to find nodes and parses .gitignore files when required. The patch includes a simple cache that can be used to save results and avoid excessive gitignore parsing. CQ: 4302 Bug 303925 Change-Id: Iebd7e5bb534accca4bf00d25bbc1f561d7cad11b Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com> Signed-off-by: Stefan Lay <stefan.lay@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Chris Aniszczyk (eclipsesource.com)
4cfc7b 29 lines Cleanup MANIFEST.MF in JGit - We shouldn't be re-exporting bundles, JSch in this case. Instead used a Import-Package clause. - Some packages weren't exported. In Eclipse we have a policy to export all the packages in a bundle - Exporting version numbers on the export packages. Bug 291108 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Chris West (Faux) (goeswhere.com)
2a5235 17 lines Allow ../relative paths in remotes git allows remotes to be relative paths, but the regex validating urls wouldn't accept anything starting with "..". Other functionality works fine with these paths. Bug 311300 Change-Id: Ib74de0450a1c602b22884e19d994ce2f52634c77
Christoph Brill (gmx.de)
e170c3 200 lines Add LsRemoteCommand to JGit API Bug 343801 Change-Id: Ic651e8e09143e15ed459461b50b2222e13da56c4 Also-by: Chris Aniszczyk <caniszczyk@gmail.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Colby Ranger (google.com)
f70eca 35 lines DfsBlockCache: Update hits to not include contains() Also expose the underlying hit and miss counters, in addition to the hit ratio. Change-Id: Icea2572d62e59318133b0a88848019f34ad70975
Constantine Plotnikov (gmail.com)
063e72 3 lines Added -crfl attribute for DiffFormatterReflowTest test data The test data is expected to have unix new lines by tests, but it is converted to crlf on Windows platform (with msys git). As result DiffFormatterReflowTest tests fail. To prevent this problem, crlf conversion is disbled for test data related to that test. Bug 295077 Change-Id: I67d3ed543fcc38647041896146de12b1781ec6be Signed-off-by: Constantine Plotnikov <constantine.plotnikov@gmail.com>
982515 21 lines Make the default encoding when reading commits UTF-8 When reading commits the system default encoding was used if no encoding was specified in the commit. The patch modifies the test to add a check that commit message was encoded correctly (the test fails on old implementation if system encoding is not UTF-8) and fixes Commit.decode() method to use UTF-8 if encoding is not specified in the commit object. Change-Id: I27101da3c2eb6edd0c4a9e4c0523e48b286e3cd5 Signed-off-by: Constantine Plotnikov <constantine.plotnikov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
cc6479 277 lines Added caching for loose object lookup during pack indexing On Windows systems, file system lookup is a slow operation, so checking each object if it exists during indexing (after receiving the pack) could take a siginificant time. This patch introduces CachedObjectDirectory that pre-caches lookup results. Bug 300397 Change-Id: I471b93f9bb3ee173eb37cae1d75e9e4eb49985e7 Signed-off-by: Constantine Plotnikov <constantine.plotnikov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
291771 3344 bytes JGit uses system encoding instead of UTF8 for parsing commits
The patch with signed-off footer in comments.
Daniel Megert (ch.ibm.com)
709cd5 56 lines Let the date formatter pick the locale. Instead of using the locale from the SystemReader we let the SystemReader create the date formats without passing the locale. Bug 368756 Change-Id: I6be9e07af804a08f3f3ac2d2d526ef594eed19e3 Signed-off-by: Daniel Megert <daniel_megert@ch.ibm.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Dariusz Luksza (luksza.org)
1bec1f 22 lines Ensure resetting on commit id When reset command was called with tag name as parameter the resulting HEAD was set to the tag's SHA-1 which is a bug. This patch ensures that repository.resolve() call always returns commit id. Change-Id: I219b898c620a75c497c8652dbf4735fd094c4d7c Signed-off-by: Dariusz Luksza <dariusz@luksza.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
1d1f57 61 lines Add support for reseting on directories Reset command should works recursively and allows reset all changed files in given directory. Bug 348524 Change-Id: I441db34f226be36548c61cef77958995971498de Signed-off-by: Dariusz Luksza <dariusz@luksza.org> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
28d48b 3 lines Don't swallow JSchException "Auth fail" exception "Auth fail" exception was swallowed during retrying, this leads to "Session down" exception during clone operation with invalid SSH keys. Bug 336795 Change-Id: Id8d9e83b10f4f2a01e0cf89819190bb23a04a2b9 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
570d86 2 lines Fix IOOBE in Repository.resolveSimple() IndexOutOfBoundException is thrown from Repository.resolveSimple() when '-g' string is located less then 4 characters from the end of this string. Change-Id: I1128c2cdfec9db3023d4d0f1f40d863e84b75950 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
679cab 343 lines Adds DiffEntry.scan(TreeWalk, boolean) method Adds method into DiffEntry class that allows to specify whether changed trees are included in scanning result list. By default changed trees aren't added, but in some cases having changed tree would be useful. Also adds check for tree count in TreeWalk and when it is different from two it will thrown an IllegalArgumentException. This change is required by egit I7ddb21e7ff54333dd6d7ace3209bbcf83da2b219 Change-Id: I5a680a73e1cffa18ade3402cc86008f46c1da1f1 Signed-off-by: Dariusz Luksza <dariusz@luksza.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
b649ea 64 lines Move writeTrashFile and deleteFile into JGitTestUtil Moves RepositoryTestCase.writeThashFile, RepositoryTestCase.deleteFile and dependencies into JGitTestUtil for further reuse. Required-by-EGit: If8dfa0251797aca56ddc825619500dc21885ba26 Change-Id: I6fc62c8e6626f907e544b5bbe5d64e864a2c323f Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
Dave Borowitz (google.com)
039c78 250 lines Try to send HTTP error messages over sideband When a client POSTs to /git-{upload,receive}-pack, the first line includes their client capabilities. As soon as the C git client sends side-band(-64k), it goes into a state where it chokes on data not sent in a valid sideband channel. GitSmartHttpTools.sendError() is called early in the request, likely before a {Upload,Receive}Pack handler is assigned or, even so, before it has read the request. In some cases we must read the first line manually within sendError() to tell whether sideband is needed. Change-Id: I8277fd45a4ec3b71fa8f87404b4f5d1a09e0f384
0f8e48 134 lines Add a listener for changes to a DfsObjDatabase's pack files Intended for cross-request use, so only refers to DfsRepositoryDescriptions rather than DfsRepositorys. Change-Id: I2633e472c9264d91d632069f608d53d4bdd0fc09
16b8eb 122 lines Add an object encapsulating the state of a PackWriter Exposes essentially the same state machine to the programmer as is exposed to the client via a ProgressMonitor, using a wrapper around beginTask()/endTask(). Change-Id: Ic3622b4acea65d2b9b3551c668806981fa7293e3
1f2022 1694 lines Modify refs in UploadPack/ReceivePack using a hook interface This is intended to replace the RefFilter interface (but does not yet, for backwards compatibility). That interface required lots of extra scanning and copying in filter cases such as only advertising a subtree of the refs directory. Instead, provide a hook that can be executed right before ref advertisement, using the public methods on UploadPack/ReceivePack to explicitly set the map of advertised refs. Change-Id: I0067019a191c8148af2cfb71a675f2258c5af0ca
27cbda 67 lines Expose an OutputStream from ReceivePack for sending client messages Callers may want to format and flush their own output, for example in a PreReceiveHook that creates its own TextProgressMonitor. The actual underlying msgOut can change over the lifetime of ReceivePack, so we implement a small wrapper. Change-Id: I57b6d6cad2542aaa93dcadc06cb3e933e81bcd3d
2b0044 42 lines Make capability strings in BasePack{Fetch,Push}Connection public Change-Id: Ib475dfc087705ea40e1db37ec9ef28a67fde6d72
2b584b 52 lines Keep track of a static collection of all PackWriter instances Stored in a weak concurrent hash map, which we clean up while iterating. Usually the weak reference behavior should not be necessary because PackWriters should be released with release(), but we still want to avoid leaks when dealing with broken client code. Change-Id: I337abb952ac6524f7f920fedf04065edf84d01d2
35d72a 179 lines Add a DFS repository description and reference it in each pack Just as DfsPackDescription describes a pack but does not imply it is open in memory, a DfsRepositoryDescription describes a repository at a basic level without it necessarily being open. Change-Id: I890b5fccdda12c1090cfabf4083b5c0e98d717f6
37307a 14 lines Enable call chaining on LsRemoteCommand methods Change-Id: I706332386415892d7a964b241442832ad79fa223
4a01f4 22 lines Allow creating ReceiveCommands with a specified type This allows callers who know in advance whether a command is UPDATE or UPDATE_NONFASTFORWARD to specify this in the constructor rather than with a separate method call. Change-Id: Iae483594a4ff370ff75d17a7b0648c5590b3d1bd
4bf22f 146 lines Execute ReceiveCommands via a method rather than in ReceivePack This allows a PreReceiveHook to easily "take over" all of the ReceiveCommands passed to it, preventing any of them from being handled within the ReceivePack core. Change-Id: I2a8c1fc44e8dcadf22cd97a8ec4ee79d4d9d08f1
4fc1af 21 lines Add a DfsPackFile method to get the number of cached bytes The counter is actually stored in the DfsPackKey so it can be manipulated by the cache. Change-Id: I10cee76c92d65c68d1aa1a9dd0c4fd7173c4cede
55bf06 26 lines Allow RepositoryResolver to throw ServiceMayNotContinueException Implementations may want to send an error message to the user, which doesn't really fit with any of the existing exception types. ServiceMayNotContinueException, on the other hand, is documented as always containing a user-visible error string, so use that. Modify the git and HTTP transport mechanisms to properly relay this message to the end user. Change-Id: I362e67ea46102a145bf2c6284d38788537c9735f
5a38e5 5 lines Clarify the docstring of DfsBlockCache.reconfigure() The docstring was copied from the local filesystem cache code, which actually attempted to reconfigure the cache on the fly. The DFS cache is designed to be "reconfigured" exactly once. Change-Id: Ia0b01f5d6b6b3d3a68d65a5c229ff67c1cede5bc
629c61 384 lines Add simple chain implementations of transport hooks and loggers Allows callers to effectively run multiple hooks and loggers without modifying the UploadPack/ReceivePack interface. Change-Id: I5b388816b63036ffff08ef3a9b857ccb764cb8c4
7acd33 2 lines Fix a typo referring to RevFilter as RefFilter Change-Id: I173efca7540b522d386216d1bd229e9a061263b2
84c80b 26 lines Fire DfsPacksChangedEvents when committing packs. Once a pack has been committed with commitPack(), we know that the pack list has changed but we don't re-scan the underlying storage. Change-Id: Ia7b35df4442a5f5dfe7e817edcc77b44b5410d08
903e1b 27 lines Remove PreUploadHook.onPreAdvertiseRefs AdvertiseRefsHook.advertiseRefs subsumes this behavior. Change-Id: Id2d1ebb2503c9ba79eda58aaea2fd76ec233427f
9bc26e 4 lines Pass a DfsRepositoryDescription to InMemoryRepository This was likely intended originally, but this class had never been used, so the mistake went unnoticed. Change-Id: I5e0e9f22ebf707c11d0581511c7a56b182188f77
9d41db 98 lines Add an AdvertiseRefsHookChain, similar to the other hook chains Change-Id: I3bb0dc86047fe0446d18e0055f714092a658d228
bb8f0b 4 lines Minor javadoc wording fixes in ReceivePack Change-Id: I5b409ef39aee890bcd7d4277e36b85ac4dc48281
cc37cb 2454 lines Factor a base class out of ReceivePack We are working on a publish/subscribe based git protocol, and we want to reuse several parts of the ReceivePack-like code for reading commands and processing a pack. In this new implementation, the connection management will be very different, in particular, there may be multiple packs received on a single open connection. So, hoist out as much as we can from ReceivePack, mostly just leaving behind the single-connection version in that class. Change-Id: I5567aad6ae77951f73f59c1f91996d934ea88334
d023f2 41 lines Extract filterCommands as a static method on ReceiveCommand Change-Id: I24501f95185878d09b54562e48cb4e7e45dd3968
d2787d 92 lines Extract the capability parsing logic in {Upload,Receive}Pack Change-Id: I7ac4e0ae98872a74b01162b5ca936fb15e2f8cff
d55eb3 15 lines Expose the reverse index size in the DfsPackDescription This is analogous to the getPackSize() and getIndexSize() methods. Change-Id: I207c0c93f9145826d84b3610eb4319fca074ee0d
d6172d 16 lines Add a no-op UploadPackLogger and use it by default This matches the behavior of the hooks in UploadPack. Change-Id: I21277e52ee9452237d87084f06bb140dfa6bf608
d794a4 9 lines Clarify documentation of exceptions in RepositoryResolver Change-Id: Idf805f76f24bfa1f3552366197e0ed4e45cb2b74
dff9d5 21 lines Expose the list of pack files in the DfsBlockCache Callers may want to inspect the contents of the cache, which this allows them to do in a read-only fashion without any locking. Change-Id: Ifd78e8ce34e26e5cc33e9dd61d70c593ce479ee0
e0531a 5 lines Properly parse first line in ReceivePack with no '\0' Change-Id: Ic98e17aff4e4b3c3fa0359082bab689e4522e3d7
eea858 12 lines Fix a typo in "capabilities" in ReceivePack Change-Id: Ib26adf954dcb90403be9d6ed3b7a425a724c67d0
f26b79 45 lines Estimate the amount of memory used by a PackWriter Memory usage is dominated by three terms: - The maximum memory allocated to each delta window. - The maximum size of a single file held in memory during delta search. - ObjectToPack instances owned by the writer. For the first two terms, rather than doing complex instrumentation of the DeltaWindows, we just overestimate based on the config parameters (though we may underestimate if the maximum size is not set). For the ObjectToPack instances, we do some rough byte accounting of the underlying Java object representation. Change-Id: I23fe3cf9d260a91f1aeb6ea22d75af8ddb9b1939
Denys Digtiar (gmail.com)
c580c5 98 lines Fix ClassCastException in MergeCommand Test was added which reproduce the ClassCastException when ours or theirs merge strategy is set to MergeCommand. Merger and MergeCommand were updated in order to avoid exception. Change-Id: I4c1284b4e80d82638d0677a05e5d38182526d196 Signed-off-by: Denys Digtiar <duemir@gmail.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Dmitry Fink (finik.net)
906887 172 lines Extend merge support for bare repositories Optional inCore parameter to Resolver/Strategy will instruct it to perform all the operations in memory and avoid modifying working folder even if there is one. Change-Id: I5b873dead3682f79110f58d7806e43f50bcc5045
Dmitry Neverov (gmail.com)
3f143b 22 lines Fix missing flush in StreamCopyThread It is possible to miss flush() invocation in StreamCopyThread. In this case some data will not be sent to remote host and we will wait forever (or until timeout) in src.read(). Use a counter to keep track of the flush requests. Change-Id: Ia818be9b109a1674d9e2a9c78e125ab248cfb75b Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
448547 26 lines Fix missing flush in StreamCopyThread It is possible that StreamCopyThread will not flush everything from it's src to it's dst. In most cases StreamCopyThread works like this: in loop: n = src.read(buf); dst.write(buf, 0, n); and when we want to flush, we interrupt() StreamCopyThread and it flushes everything it wrote to dst. The problem is that our interrupt() could interrupt reading. In this case we will flush everything we wrote to dst, but not everything we wrote to src. Change-Id: Ifaf4d8be87535c7364dd59b217dfc631460018ff Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
b3247b 10 lines Fix race condition in StreamCopyThread If we get an interrupt during an IO operation (src.read or dst.write) caused by the flush() method incrementing the flush counter, ensure we restart the proper section of code. Just ignore the interrupt and continue running. Bug 313082 Change-Id: Ib2b37901af8141289bbac9807cacf42b4e2461bd Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Git Development Community (vger.kernel.org)
1a6964 103215 lines Initial JGit contribution to eclipse.org Per CQ 3448 this is the initial contribution of the JGit project to eclipse.org. It is derived from the historical JGit repository at commit 3a2dd9921c8a08740a9e02c421469e5b1a9e47cb. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Igor Fedorenko (ifedorenko.com)
53f363 19 lines Use Tycho version 0.6.0 Changed Tycho version from 0.6.0-SNAPSHOT to 0.6.0 (i.e. release). SNAPSHOT versions are transient and should only be used for testing purposes only. Also removed now unnecessary <pluginRepositories/> element from JGit parent pom.xml file. Change-Id: Ie386b2dbcba43c1ccec10465978d12d6829c6150 Signed-off-by: Igor Fedorenko <igor@ifedorenko.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7085c0 9 lines Explicitly release resources used by java.util.zip.Deflater Deflater can use significant amount of native (i.e. C) heap space. Failure to promptly release this memory results in native memory leak in some cases, particularly severe for VMs with large java max heap size. For example, running Team->Commit in one of my EGit workspaces results in ~500M java process size increase without any significant change to amount of used java heap when JVM is started with -Xmx1024m. Change-Id: I649679a8df5683ebedd9380d703513d31c625932 Signed-off-by: Igor Fedorenko <igor@ifedorenko.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
96c7f7 122 lines Flipped jgit.core to manifest-first maven-3/tycho build Change-Id: I6005134a45046d16e323a2f9b2815831cdbe15e0 Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
b427e3 1 lines Use build timestamp as OSGi version qualifier for SNAPSHOT builds Default maven-bundle-plugin behaviour results in use of the same .SNAPSHOT OSGi bundle version qualifier for all snapshot builds. This causes problems for eclipse update manager and other consumers that rely on OSGi bundle metadata to select "newer" or "best matching" version of jgit bundle. To solve the problem, maven-bundle-plugin is configured to replace .SNAPSHOT with build timestamp in format like 20100106-1234. Change-Id: I0999c7bd68aa2ee74dffaed54a8dc4e1b67cf80d Signed-off-by: Igor Fedorenko <igor@ifedorenko.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Jeff Schumacher (google.com)
31311c 304 lines Implemented file path based tie breaking to exact rename detection During the exact rename detection phase in RenameDetector, ties were resolved on a first-found basis. I added support for file path based tie breaking during that phase. Basically, there are four situations that have to be handled: One add matching one delete: In this simple case, we pair them as a rename. One add matching many deletes: Find the delete whos path matches the add the closest, and pair them as a rename. Many adds matching one delete: Similar to the above case, we find the add that matches the delete the closest, and pair them as a rename. The other adds are marked as copies of the delete. Many adds matching many deletes: Build a scoring matrix similar to the one used for content- based matching, scoring instead by file path. Some of the utility functions in SimilarityRenameDetector are used in this case, as we use the same encoding scheme. Once the matrix is built, scan it for the best matc hes, marking them as renames. The rest a
396fe6 297 lines Break dissimilar file pairs during diff File pairs that are very dissimilar during a diff were not being broken apart into their constituent ADD/DELETE pairs. The leads to sub-optimal rename detection. Take, for example, this situation: A file exists at src/a.txt containing "foo". A user renames src/a.txt to src/b.txt, then adds a new src/a.txt containing "bar". Even though the old a.txt and the new b.txt are identical, the rename detection algorithm would not detect it as a rename since it was already paired in a MODIFY. I added code to split all MODIFYs below a certain score into their constituent ADD/DELETE pairs. This allows situations like the one I described above to be more correctly handled. Change-Id: I22c04b70581f206bbc68c4cd1ee87a1f663b418e Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
4c14b7 2 lines Fixed potential div by zero bug The scoring logic in SimilarityIndex was dividing by the max file size. If both files are empty, this would cause a div by zero error. This case cannot currently happen, since two empty files would have the same SHA1, and would therefore be caught in the earlier SHA1 based detection pass. Still, if this logic eventually gets separated from that pass, a div by zero error would occur. I changed the logic to instead consider two empty files to have a similarity score of 100. Change-Id: Ic08e18a066b8fef25bb5e7c62418106a8cee762a
543235 440 lines Added support for whitespace ignoring JGit did not have support for skipping whitespace when comparing lines in RawText objects. I added a subclass of RawText that skips whitespace in its equals and hashCode methods. I used a subclass rather than adding functionality into RawText so that performance would not be impacted by extra logic. This class only supports ignoring all whitespace. Others will follow that allow other forms of whitespace ignoring. Change-Id: Ic2f79e85215e48d3fd53ec1b4ad13373dd183a4a
64b945 32 lines Added file size based rename detection optimization Prior to this change, files that were very different in size (enough so that they could not have enough in common to be detected as renames) were still having their scores calculated. I added an optimization to skip such files. For example, if the rename detection threshold is 60%, the larger file is 200kb, and the smaller file is 50kb, the pair cannot be counted as a rename since they cannot possibly share 60% of their content in common. (200*.6=120, 120>50) Change-Id: Icd8315412d5de6292839778e7cea7fe6f061b0fc
7b0b41 299 lines Refactored code out of FileHeader to facilitate rename detection Refactored a superclass out of FileHeader called DiffEntry that holds the more general data from FileHeader that is useful in rename detection (old/new Ids, modes, names, as well as changeType and score). FileHeader is now a DiffEntry that adds Hunks, parsing abilities, etc. Change-Id: I8398728cd218f8c6e98f7a4a7f2f342391d865e4
9869ef 665 lines Added further support for whitespace ignoring during diff Added code to support ignoring leading, trailing, and changed whitespace when performing a diff operation. I also added command line options to Diff to enable the various whitespace ignoring methods. These match the flags for git diff. Change-Id: Ie56301aafad59ee3f0fe5de62719f5023cd702c8
9a48de 82 lines Added file path similarity to scoring metric in rename detection The scoring method was not taking into account the similarity of the file paths and file names. I changed the metric so that it is 99% based on content (which used to be 100% of the old metric), and 1% based on path similarity. Of that 1%, half (.5% of the total final score) is based on the actual file names (e.g. "foo.java"), and half on the directory (e.g. "src/com/foo/bar/"). Change-Id: I94f0c23bf6413c491b10d5625f6ad7d2ecfb4def
9f2249 44 lines Added check for binary files while diffing Added a check in Diff to ensure that files that are most likely not text are not line-by-line diffed. Files are determined to be binary by checking the first 8000 bytes for a null character. This is a similar heuristic to what C Git uses. Change-Id: I2b6f05674c88d89b3f549a5db483f850f7f46c26
a20e6f 4 lines Fixed Misleading Javadoc The javadoc for the setRenameLimit method in RenameDetector said that you could only have limits in the range (0,100), implying that 0 and 100 were illegal inputs. The code, however, allowed 0 and 100. I changed the javadoc to say that the range [0,100] was legal. I also documented the IllegalArgumentException that is thrown if the limit is outside that range. Change-Id: I916838f254859f6f0e1516bb55b8e7dc87e57dc2
a8b29a 493 lines Create FileHeader from DiffEntry Added support for converting DiffEntrys to FileHeaders. FileHeaders are DiffEntrys with a buffer containing the diff output as well as a list of HunkHeaders. The HunkHeaders contain EditLists. The createFileHeader(DiffEntry) method in DiffFormatter performs a Myers Diff on the files refered to by the DiffEntry, then puts the returned EditList into a single HunkHeader, which is then put into the FileHeader to be returned. It also generates the appropriate diff header an puts it into the FileHeader's buffer. The rest of the diff output, which would normally be parsed to generate the HunkHeaders, is not generated. In fact, the purpose of this method is to avoid the costly diff output generation and parsing normally required to create a FileHeader. Change-Id: I7d8b18c0f6c85e3d02ad58995d3d231e69af5887
bc08fa 4 lines Added very small optimization to exact rename detection Optimized a small loop in findExactRenames. The loop would go through all the items in a list of DiffEntries even after it already found what it was looking for. I made it break out of the loop as soon as a good match was found. Change-Id: I28741e0c49ce52d8008930a87cd1db7037700a61
cb8e1e 479 lines Added a preliminary version of rename detection JGit does not currently do rename detection during diffs. I added a class that, given a TreeWalk to iterate over, can output a list of DiffEntry's for that TreeWalk, taking into account renames. This class only detects renames by SHA1's. More complex rename detection, along the lines of what C Git does will be added later. Change-Id: I93606ce15da70df6660651ec322ea50718dd7c04
e64cb0 18 lines Fixed bug in scoring mechanism for rename detection A bug in rename detection would cause file scores to be wrong. The bug was due to the way rename detection would judge the similarity between files. If file A has three lines containing 'foo', and file B has 5 lines containing 'foo', the rename detection phase should record that A and B have three lines in common (the minimum of the number of times that line appears in both files). Instead, it would choose the the number of times the line appeared in the destination file, in this case file B. I fixed the bug by having the SimilarityIndex instead choose the minimum number, as it should. I also added a test case to verify that the bug had been fixed. Change-Id: Ic75272a2d6e512a361f88eec91e1b8a7c2298d6b
f666cc 117 lines Added more test cases for RenameDetector I added test cases to cover the majority of the code. It's not 100% coverage yet, but the remaining bits are small. Change-Id: Ib534c8e94b13358b8b22cf54e2ff84132bae6d14
Jens Baumgart (sap.com)
0a84ad 22 lines Unlock DirCache in case of occurring exception A DirCache was not unlocked if an exception occurred in the DirCacheCheckout constructor. Bug 365449 Change-Id: I231d902d52e3e5e9a7748eedaa63a2bb889ebb13 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
29ed09 3 lines PushCommand: do not set a null credentials provider PushCommand now does not set a null credentials provider on Transport because in this case the default provider is replaced with null and the default mechanism for providing credentials is not working. Bug 336023 Change-Id: I7a7a9221afcfebe2e1595a5e59641e6c1ae4a207 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
2dc2dd 34 lines IndexDiff: support state [removed, untracked] IndexDiff was extended to detect files which are both removed from the index and untracked. Before this change these files were only added to the removed collection. Change-Id: I971d8261d2e8932039fce462b59c12e143f79f90 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
3ba1c7 209 lines Add gitignore support to IndexDiff and use TreeWalk IndexDiff was re-implemented and now uses TreeWalk instead of GitIndex. Additionally, gitignore support and retrieval of untracked files was added. Change-Id: Ie6a8e04833c61d44c668c906b161202b200bb509 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
51e264 2941 lines Introduce http test bundle Introduce a http test bundle to make this functionality available for EGit tests. A simple http server class is provided. The jetty version was updated to a version that is also available via p2 (needed in EGit UI tests). Change-Id: I13bfc4c6c47e27d8f97d3e9752347d6d23e553d4 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
53ef3e 160 lines Add detection of untracked folders to IndexDiffFilter Decorators need to know whether folders in the working tree contain only untracked files. This change enhances IndexDiffFilter to report such folders. This works only together with treewalks which operate in default traversal mode. For treewalks which process entries in postorder mode (files are walked before their parent folder is walked) this detection doesn't work. Bug 359264 Change-Id: I9298d1e3ccac0aec8bbd4e8ac867bc06a5c89c9f Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Chris Aniszczyk <zx@twitter.com>
6befab 41 lines Extend IndexDiff to calculate ignored files and folders IndexDiff was extended to calculate ignored files and folders. The calculation only considers files that are NOT in the index. This functionality is required by the new EGit decorator implementation. Bug 359264 Change-Id: I8f09d6a4d61b64aeea80fd22bf3a2963c2bca347 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
6f3b08 25 lines Allow setting a filter in IndexDiff IndexDiff now allows to set an additional filter. This can be used e.g. for restricting the tree walk to a given set of files. Change-Id: I642de17e74b997fa0c5878c90631f6640ed70bdd Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
9830ba 19 lines CommitCommand: set correct Reflog message when amending Change-Id: I2322d31b09ca63bdcee50e90340e326467dc5021 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
99ec98 18 lines RepositoryState: add method canAmend The method canAmend was added to RepositoryState. It returns true if amending the HEAD commit is allowed in the current repository state. Change-Id: Idd0c4eea83a23c41340789b7b877959b457d951e Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
9a6a43 20 lines Fix NPE on commit in empty Repository NPE occured when committing in an empty repository. Bug 321858 Change-Id: Ibddb056c32c14c1444785501c43b95fdf64884b1 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
b82e4b 7 lines Fix NPE on reading global config on MAC Bug 336610 Change-Id: Iefcb85e791723801faa315b3ee45fb19e3ca52fb Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
c0b49c 46 lines JGit Build: use jetty 7.1.6 Jetty 7.1.6 is used because this version is also available in P2. Change-Id: I410fbca8592cac6e58c651c4d086573820e777a5 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
c9e4a7 10 lines Add isOutdated method to DirCache isOutdated returns true iff the memory state differs from the index file. Change-Id: If35db06743f5f588ab19d360fd2a18a07c918edb Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
cbf5ff 21 lines LockFile.commit: retry renaming Currently the following can happen in LockFile.commit: deletion of the original file succeeds but renaming fails afterwards. In this case the original file (e.g. branch file in refs/heads) is lost. To workaround the issue the same retry logic as for file deletion is applied to file renaming. Bug 331890 Change-Id: I68620c07f2d3ab7f3279c71a91e184e8eac69832 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Philipp Thun <philipp.thun@sap.com>
cc905e 70 lines Make Repository.getConfig aware of changed config In the current implementation Repository reads user and repository config only at creation point of time. The new implementatiopn checks in Repository.getConfig if user or repository config have changed on disk and reload the config if required. Change-Id: Ibd97515919ef66c6f8aa1a4fe8a11a6711335dad Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
cd1141 97 lines Improve IndexDiff performance Exclude ignored files from IndexDiff tree walk. This makes EGit commit much faster. Change-Id: I398499510c22c37667b7612db32eac3b31d325f0 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
db82b8 172 lines Fix concurrent read / write issue in LockFile on Windows LockFile.commit fails if another thread concurrently reads the base file. The problem is fixed by retrying the rename operation if it fails. Change-Id: I6bb76ea7f2e6e90e3ddc45f9dd4d69bd1b6fa1eb Bug 308506 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
dcf9ba 2 lines Ignore missing MERGE_MSG when deleting MERGE_MSG Repository.writeMergeCommitMsg(null) no longer fails if the MERGE_MSG file is missing. This was done to avoid CommitCommand to fail in case of a missing MERGE_MSG file. Bug 352243 Change-Id: Iddf43533d133f8f22199ed6e2393a552670e7d1f Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
e99c48 52 lines Fix concurrent read / write issue in GitIndex on Windows GitIndex.write fails if another thread concurrently reads the index file. The problem is fixed by retrying the rename operation if it fails. Bug 311051 Change-Id: Ib243d2a90adae312712d02521de4834d06804944 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
eb46d7 10 lines DirCacheCheckout: unlock DirCache in case of failure DirCacheCheckout did not unlock the index if e.g. an IOException occured during checkout. Bug 350677 Change-Id: Ie9fa09f7a404080da7cdccafb9be3a8c845e4869 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
f71498 4 lines Fix RepositoryState.MERGING canResetHead now returns true. Resetting mixed / hard works in EGit in merging state. Change-Id: I1512145bbd831bb9734528ce8b71b1701e3e6aa9 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
fd963a 97 lines CommitCommand: add option to insert a change id An option to insert a change id into the commit message was added to CommitCommand. This change is a prerequisite for removing GitIndex from EGit. Change-Id: Iff9e26a8aaf21d8224bfd6ce3c98821c077bcd82 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Philipp Thun <philipp.thun@sap.com> Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
Jesse Greenwald (garmin.com)
51dedf 121 lines Parse RevCommit bodies before calling RevFilter.include() RevFilter.include()'s documentation promises the RevCommit's body is parsed before include is invoked. This wasn't always true if the commit was parsed once, had its body discarded, the RevWalk was reset() and started a new traversal. Change-Id: Ie5cafde09ae870712b165d8a97a2c9daf90b1dbd Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
c5863e 187 lines Changed TreeWalk.forPath(...) to work with recursive paths. Previously, this method would not (always) work when a recursive path such as "a/b" was passed into it. Change-Id: I0752a1f5fc7fef32064d8f921b33187c0bdc7227 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
c68aba 4 lines Fixed ordering of Config.getSubsections(...) A standard HashSet was being used to store the list of subsections as they were being parsed. This was changed to use a LinkedHashSet so that iterating over the set would return values in the same order as they are listed in the config file. Change-Id: I4251f95b8fe0ad59b07ff563c9ebb468f996c37d
Johannes Schindelin (gmx.de)
1a03c8 109 lines Add a test class for Myers' diff algorithm Bug 291083 Eclipse-CQ: 3559 Change-Id: I5a10946637438052e7596489b9f9de3a0c6b2066 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
9c056f 39 lines Add set to IntList Some applications may wish to modify an int list. Bug 291083 Eclipse-CQ: 3559 Change-Id: Iea871443ec661230aec92397229f1eda6c74216f Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
a3aa43 143 lines Add the "jgit diff" command This commit contains fixes provided by Christian Halstrick. Bug 291083 Eclipse-CQ: 3559 Change-Id: If8d187e70a51f31040f99098489e513791dc6415 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
d8a3b4 469 lines Add Myers' algorithm to generate diff scripts Myers' algorithm is the standard way to generate diff scripts in an efficient manner (especially memory-wise). The source contains extensive documentation about the principal ideas of the algorithm. Bug 291083 Eclipse-CQ: 3559 Change-Id: Id873e7c2c204692cb4a1a05d24b733154b9ed49c Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
e34865 28 lines Prepare RawText for diff-index and diff-files Bug 291083 Eclipse-CQ: 3559 Change-Id: Ia02f346a96b5f1e24f8bc9676bd428b968a41222 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Jonas Fonseca (diku.dk)
36b0dc 20 lines Make it possible to clear a PlotCommitList This allows SwingGraphPanes to be reused by simply clearing and re-filling. Requires RevObjectList initialization to not call clear() from its constructor, because this will lead PlotCommitList.clear() to be called before all variables have been initialized. Change-Id: I14a07124441b58cd88c67da088ba52ef9c30b043 Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Jonathan Gossage (gmail.com)
ec13e0 48 lines Fully implement Logger interface On April 27, 2010 the Logger interface was upgraded with a number of new methods to make it consistent with the implementations it was meant to support. This patch makes RecordingLogger consistent with the Logger interface and allows to also use Jetty 7.1.5 released with Helios which can be installed from the p2 repository at http://download.eclipse.org/jetty/7.1.5.v20100705/repository Change-Id: I5645436bbe7492f82d4069e4d9cbebede0bf764e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Ketan Padegaonkar (gmail.com)
04df08 11 lines Add better exception handling for the git-init ant task Change-Id: Ia935720fc9c09b427abb84be038c4dc74610850c Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
130eca 129 lines Add GitCheckoutTask to org.eclipse.jgit.ant Bug 321237 Change-Id: I5c4753f7b99d0be002b32e403f5dfff9353c57b0 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
3344b9 157 lines Add GitAddTask Change-Id: Ia9a3c9f4728e13d1e62f530b1d843d09afb4eb42 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
376acf 14 lines Add FileRepository(String) convenience constructor Add a convenience API in FileRepository to pass in a String that points to the GIT_DIR location. This is converted to a File and sent through the usual constructor. Change-Id: I588388f37e89b8c690020f110a1bc59f46170c40
8b8ad7 71 lines Fix a complicated multi level nested if block structure to use a single level with multiple returns. Change-Id: I3f116f37045e83aba5c80d45b987ab075502dcc6
d60001 149 lines Add GitCloneTaskTest Change-Id: Iec8cd032d8d659a896d909f9094f76b7d35147e6 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
dc30c9 67 lines Add org.eclipse.jgit.ant.test Change-Id: I9bfb1298864294b8ce29b91660f1cf8316e5f620 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
dce5f9 14 lines Add better javadoc to the git-init ant task Change-Id: If41e5a9ab37533cce10ea1c1925d7bd3ece586ea Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
e38cf2 154 lines Add ListTagCommand to JGit API Bug 355246 Change-Id: I11e019f3c19b4340ac7160ac8fcbadd52499d322 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
f8b89a 120 lines Add GitCloneTask to org.eclipse.jgit.ant Bug 321237 Change-Id: I605da8150048158d918c577ef8ca4f6edbed0133 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
f953a3 36 lines Fix NPE in URIish when parsing an empty URI Change-Id: Id1c42dc9843f62c581b9904b02150de53cf7777c Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
fdeb32 156 lines Add org.eclipse.jgit.ant Adds the initial project and a GitInitTask. Bug 321237 Change-Id: I06b94e0b42b20ecf51f86845e47d49913f3513c4 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Kevin Sawicki (github.com)
16e810 21 lines Add shortening of note ref names to NoteMap Change-Id: I224190bbb41c7cbea38388d0148ecc6dc68f3a14 Signed-off-by: Kevin Sawicki <kevin@github.com>
1b472a 14 lines Add missing '' characters around quoted variables Double ' characters are needed for variables to appear in single quotes. Variables surrounded with a s single ' will not be replaced when formatted Change-Id: I0182c1f679ba879ca19dd81bf46924f415dc6003 Signed-off-by: Kevin Sawicki <kevin@github.com>
241e03 6 lines Don't iterate over advertised refs when HEAD is null Moves the check from inside the loop to outside the loop and returns immediately if the HEAD advertisded ref is null Change-Id: I539da6cafb4f73610b8e00259e32bd4d57f4f4cc
2539b1 5 lines Set expected old object id to all zeros when head id is null This will be the case on the initial commit to a repository and the ref update should expect a non-existent ref Change-Id: Iaa06e47e6e8cc4a0281c7683b367d4806dd980ea
2d63c4 22 lines Provide merge result when revert command fails This allows callers to determine why the revert did not complete successfully Change-Id: Ie44bb8523cac388b63748bc69ebdd3c3a3665d06 Signed-off-by: Kevin Sawicki <kevin@github.com>
37e401 42 lines Add blame unit test for file that is renamed twice. Bug 354507 Change-Id: I853774ecc1662d095a50a9668431c6e3ce4156c4 Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
4005f3 9 lines Remove duplicate calls to DirCache.unlock on checkout Calls to unlock the DirCache before throwing an exception were not needed since checkout calls doCheckout wrapped in a try block that calls DirCache.unlock in a finally block. Change-Id: I2b249a784f9e363430e288aad67fcefb7fac0a6e Signed-off-by: Kevin Sawicki <kevin@github.com>
425d17 2 lines Remove unused serialVersionUID from non-serializable classes. Change-Id: I819e2ca88577382b54d38b7a1247e94a5127ef9e Signed-off-by: Kevin Sawicki <kevin@github.com>
4ae9d4 7 lines Correct comment on CloneCommand.setRemote method. The previous comment stated that the value set was used to keep track of the branch in the remote repository which was incorrect. Updated the method comment to match the format used for the PushCommand.setRemote and FetchCommand.setRemote methods. Change-Id: I11b81eb3125958af29247b485da56fd88c3bfdf5 Signed-off-by: Kevin Sawicki <kevin@github.com>
5041f7 2 lines Suppress unused and unchecked warnings Change-Id: I9f51cc749f5cb9d2e3aa86874e60fca29b779565 Signed-off-by: Kevin Sawicki <kevin@github.com>
565e4a 2 lines Add missing comment text for mergeCommitTree parameter Change-Id: I35cef13d8be4f06515668f710fd508700b90f44d Signed-off-by: Kevin Sawicki <kevin@github.com>
654f72 27 lines Add varargs version of PathFilterGroup.createFromStrings This allows the following usage pattern: PathFilterGroup.createFromStrings("path1", "path2"); Change-Id: I589e758cc55873ce75614602e017ac793435e24d Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
7ed1ef 6 lines Implement Serializable interface in ReflogEntry Change-Id: Idf798dd3981bef3dc9e17c13c12809f89089e96f
86e96b 2 lines Correct typo in RevWalk.parseBody comment Change-Id: I0e65a5a6809a8d32d256322dbcae94b6aa603e5e Signed-off-by: Kevin Sawicki <kevin@github.com>
899114 22 lines Always checkout master when it matches the advertised HEAD This parallels the CGit behavior of always using refs/heads/master when it matches the remote advertised HEAD commit. Change-Id: I5a5cd1516b58d116e334056aba1ef7990697ec30
900bdb 110 lines Support adding all refs to LogCommand Bug 353310 Change-Id: Ifa2e7ed58c7f2bdfe3aafbd500b5a38c1f94c2ec Signed-off-by: Kevin Sawicki <kevin@github.com>
931b93 244 lines Provide an id for submodule entries. Open a repository for submodule entries that have a child .git directory and use the resolved HEAD commit as the entry's id. Change-Id: I68d6e127f018b24ee865865a2dd3011a0e21453c Signed-off-by: Kevin Sawicki <kevin@github.com>
a5b5d5 5 lines Implement Serializable interface in PersonIdent class. Change-Id: I3229f4ec85e7604cb45642813757975b30f1227e Signed-off-by: Kevin Sawicki <kevin@github.com>
a7aaf8 47 lines Use HEAD as default ref for RefLogCommand. This mirrors the default command-line behavior. Change-Id: I4f819410fa6df3064c560beb3184b61fd7bb1f15 Signed-off-by: Kevin Sawicki <kevin@github.com>
ac909e 2 lines Fix typo in IndexDiff.getModified() comment. Removes an extra instance of the word 'on'. Change-Id: Ie5f137f0dda440f5879f6d5c62ebce0431530ad7 Signed-off-by: Kevin Sawicki <kevin@github.com>
b127fa 31 lines Unwind loop that iterates over fetch connection refs. Create separate loops based on whether the ref specs collection is empty or not. Change-Id: I2861b45fe083675e12ff47f591e104f8cf6dd216 Signed-off-by: Kevin Sawicki <kevin@github.com>
b4ff1e 7 lines Remove calls to printStackTrace in catch blocks Change-Id: I7a4179f10a4841e80b6546e1e7662cab71eac5e9
c3fe50 20 lines Guard against null branch in PullCommand Throw a NoHeadException when Repository.getFullBranch returns null Bug 351543 Change-Id: I666cd5b67781508a293ae553c6fe5c080c8f4d99 Signed-off-by: Kevin Sawicki <kevin@github.com>
d110fb 1 lines [blame] Reset rename detector before computing renames. Bug 354507 Change-Id: I5e9c65a082d9dee1e87536c5cf2a8de75efa6a33 Signed-off-by: Kevin Sawicki <kevin@github.com>
da901c 408 lines Support a configured credentials provider in LsRemoteCommand Refactored the three common transport configuration options: credentials provider, timeout, and transport config callback into a new TransportCommand base class which is now extended by all commands that use a Transport object during execution. Bug 349188 Change-Id: I90c2c14fb4e3cc4712905158f9047153a0c235c2 Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Chris Aniszczyk <zx@twitter.com>
e54404 2 lines Reassign symbolic ref list after calling put. This is required since RefList.put returns a new RefList. Change-Id: I717d75d6f6154a6e0dc7cde3b72b0a59c68d955c Signed-off-by: Kevin Sawicki <kevin@github.com>
e630f9 1 lines Remove TODO for generated constructor. Change-Id: Ie405f6de99b8fa632d7462400e647a37f30e2e31 Signed-off-by: Kevin Sawicki <kevin@github.com>
ec92f8 238 lines Add path support to checkout command. Change-Id: I89e8edfc6dd87d5bf8fd08704df2432720084330 Signed-off-by: Kevin Sawicki <kevin@github.com>
Leonard Broman (gmail.com)
09be39 110 lines Hande latin-1 encoding Bug 342259 Change-Id: Ie285b8819b5ea6f9892ebafc4ebbd9c6d091d1fe Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Lluis Sanchez (gmail.com)
07cae6 9 lines Optimize DirCacheCheckout When checking out a tree, files that are identical to the file in the current index and working directory don't need to be updated. Change-Id: I9e025a53facd42410796eae821baaeff684a25c5 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Manuel Doninger (googlemail.com)
458b5a 6 lines New config constant for default start-point This constant determine the default start-point, if the user don't want to create a branch from the current HEAD. Change-Id: Iea944e11e80134fbafc4c47383457d5ed11a4164 Signed-off-by: Manuel Doninger <manuel.doninger@googlemail.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Marc Strapetz (syntevo.com)
253b36 130 lines Partial support for index file format "3". Extended flags are processed and available via DirCacheEntry's new isSkipWorkTree() and isIntentToAdd() methods. "resolve-undo" information is completely ignored since its an optional extension. Change-Id: Ie6e9c6784c9f265ca3c013c6dc0e6bd29d3b7233
57d13c 12 lines Fix processing of broken symbolic references in RefDirectory Change-Id: Ic1ceb9c99dca2c69e61ea0ef03ec64f13714b80a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7df17e 47 lines EolCanonicalizingInputStream: binary detection should be optional EolCanonicalizingInputStream may also be used in combination with .gitattributes. If .gitattributes states that a file is of type text, line endings have to be canonicalized even if the actual file content seems to be binary. Change-Id: Ie4ccdfc5cb91fbd55e06f51146cf5c7c84b8e18b
80c622 288 lines Fix parsing of multiple authors in PersonIdent. PersonIdent should be parsable for an invalid commit which contains multiple authors, like "A <a@a.org>, B <b@b.org>". PersonIdent(String) constructor now delegates to RawParseUtils.parsePersonIdent(). Change-Id: Ie9798d36d9ecfcc0094ca795f5a44b003136eaf7
80f494 2 lines Fix RawParseUtils.formatBase10 to work with negative values Change-Id: Iffa220de76c5e180796fa46c4d67f52a1b3b2e35 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
936e4a 417 lines Repository can be configured with FS On Windows, FS_Win32_Cygwin has been used if a Cygwin Git installation is present in the PATH. Assuming that the user works with the Cygwin Git installation may result in unnecessary overhead if he actually does not. Applications built on top of jgit may have more knowledge on the actually used Git client (Cygwin or not) and hence should be able to configure which FS to use accordingly. Change-Id: Ifc4278078b298781d55cf5421e9647a21fa5db24
a32777 39 lines Fix: possible IndexOutOfBoundsException in ReflogReader java.lang.IndexOutOfBoundsException at java.nio.ByteBuffer.wrap(ByteBuffer.java:352) at org.eclipse.jgit.util.RawParseUtils.decodeNoFallback(RawParseUtils.java:913) at org.eclipse.jgit.util.RawParseUtils.decode(RawParseUtils.java:880) at org.eclipse.jgit.util.RawParseUtils.decode(RawParseUtils.java:839) at org.eclipse.jgit.storage.file.ReflogReader$Entry.<init>(ReflogReader.java:102) at org.eclipse.jgit.storage.file.ReflogReader.getReverseEntries(ReflogReader.java:183) at org.eclipse.jgit.storage.file.ReflogReader.getReverseEntries(ReflogReader.java:162) Change-Id: I22a18bc7193962e5018c40a75337f9976b585c40
b297cf 12 lines Fix processing of broken symbolic references in RefDirectory Change-Id: I1f85890fe718f38ef4b62ebe711f0668267873a2
bf8111 22 lines DirCacheEntry: accessors for cached creation time (CTIME) Change-Id: I986d5fff63ff1a86cca6bab49c744ea673fe4892
e147fb 98 lines Fix DiffConfig to understand "copy" resp. "copies" for diff.renames property. Rename detection should be considered enabled if diff.renames config property is set to "copy" or "copies", instead of throwing IllegalArgumentException. Change-Id: If55d955e37235d4d00f5b0febd6aa10c0e27814e
e2e387 694 lines Perform automatic CRLF to LF conversion during WorkingTreeIterator WorkingTreeIterator now optionally performs CRLF to LF conversion for text files. A basic framework is left in place to support enabling (or disabling) this feature based on gitattributes, and also to support the more generic smudge/clean filter system. As there is no gitattribute support yet in JGit this is left unimplemented, but the mightNeedCleaning(), isBinary() and filterClean() methods will provide reasonable places to plug that into in the future. [sp: All bugs inside of WorkingTreeIterator are my fault, I wrote most of it while cherry-picking this patch and building it on top of Marc's original work.] CQ: 4419 Bug 301775 Change-Id: I0ca35cfbfe3f503729cbfc1d5034ad4abcd1097e Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
ea4ff6 102 lines IndexDiff honors Index entries' "skipWorkTree" flag. Change-Id: I428d11412130b64fc46d7052011f5dff3d653802 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Markus Duft (salomon.at)
2ba67b 32 lines Don't use java.nio channel for file size determination Java NIO has some problems (like files closing unexpectedly because the thread was interrupted). To avoid those problems, don't use a NIO channel to determine the size of a file, but rather ask the File itself. We have to be prepared to handle wrong/outdated information in this case too, as the inode of the File may change between opening and determining file size. Change-Id: Ic7aa6c3337480879efcce4a3058b548cd0e2cef0
d14035 4 lines Fix compilation error due to missing javadoc. Another change introduced this problem. With default JGit project settings there is a compilation problem as javadoc problems are set to Error in the project preferences. Change-Id: I81e3ceeb02f7a2119b2a6cfefb7fbd9e83771fc9
edc1fe 85 lines Fix rebase > continue when nothing left to commit. If after resolving all conflicts nothing is left to commit, return an according result, so that downstreams (EGit, ...) can behave like cgit, and display a nice message informing the user. Currently, EGit displays a "HEAD advanced fast forward" message, which is absolutely not helpful at all. This is the basic API revamping required to get that state communicated to the outside world (EGit). Bug 336812 Change-Id: If2665005cf54a5b51c0fe80bad019fa42b0205af
Mathias Kinzler (sap.com)
12b635 9 lines RebaseCommand: trim line endings when reading files In order to enable interoperability with the command line, we need to remove line feeds when reading the files. Change-Id: Ie2f5799037a60243bb4fac52346908ff85c0ce5d Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
13a406 20 lines Expose some constants needed for reading the Pull configuration Change-Id: I72cb1cc718800c09366306ab2eebd43cd82023ff Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
14ca80 410 lines Make PullCommand work with Rebase Rebase must honor the upstream configuration branch.<branchname>.rebase Change-Id: Ic94f263d3f47b630ad75bd5412cb4741bb1109ca Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
2941d2 774 lines Avoid double quotes in Git Config Currently, if a branch is created that has special chars ('#' in the bug), Config will surround the subsection name with double quotes during it's toText method which will result in an invalid file after saving the Config. Bug 318249 Change-Id: I0a642f52def42d936869e4aaaeb6999567901001 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
2a7cd0 82 lines Rebase: fix wrong update if original HEAD after Merge+Skip Rebase would update the original HEAD to the wrong commit when "skipping" the last commit after a merged commit. Includes a test for the specific situation. Change-Id: I087314b1834a3f11a4561f04ca5c21411d54d993 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
3c51b3 389 lines "Bare" Repository should not return working directory. If a repository is "bare", it currently still returns a working directory. This conflicts with the specification of "bare"-ness. Bug 311902 Change-Id: Ib54b31ddc80b9032e6e7bf013948bb83e12cfd88 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
414e0c 12 lines Make setCredentialsProvider more convenient to use Change-Id: I984836ea7d6a67fd2d1d05f270afa7c29f30971c Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
51c6f5 5 lines Stack Overflow in EGit History View This is caused by a recursion in PlotWalk.getTags(). As a hotfix, the sort was simply removed. The sort must be re-implemented so that parseAny() is not called again (currently, this happens in the PlotRefComparator). Change-Id: I060d26fda8a75ac803acaf89cfb7d3b4317328f3 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
59e62b 50 lines Rebase Interoperability second part: fix "pop steps" If the CLI stops a rebase upon conflict, the current step is already popped from the git-rebase-todo and appended to the "done" file. The current implementation wrongly pops the step only after successful cherry-pick. Change-Id: I8640dda0cbb2a5271ecf75fcbad69410122eeab6 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
5c135a 33 lines DeleteBranchCommand does not clean up upstream configuration It wrongly uses the full name of the branch to remove the configuration entries but must use the shortened one. Change-Id: Ie386a128a6c6beccc20bafd15c2e36254c5f560d Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
5ebfdc 9 lines ConfigConstants: expose some constants for user name and email. This is needed by a EGit change http://egit.eclipse.org/r/#change,2232 Change-Id: I3d62f904b769fc2f1b7b8f0f24f7dd757fc9c379 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
645d26 254 lines Checkout: expose a CheckoutResult This is needed by callers to determine checkout conflicts and possible files that were not deleted during the checkout so that they can present the end user with a better Exception description and retry to delete the undeleted files later, respectively. Change-Id: I037930da7b1a4dfb24cfa3205afb51dc29e4a5b8 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
6bca46 871 lines Implement rebase --continue and --skip For --continue, the Rebase command asserts that there are no unmerged paths in the current repository. Then it checks if a commit is needed. If yes, the commit message and author are taken from the author_script and message files, respectively, and a commit is performed before the next step is applied. For --skip, the workspace is reset to the current HEAD before applying the next step. Includes some tests and a refactoring that extracts Strings in the code into constants. Change-Id: I72d9968535727046e737ec20e23239fe79976179 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
6e59e6 6 lines Meaningful error message when trying to check-out submodules Currently, a NullPointerException occurs in this case. We should instead throw a more meaningful Exception with a proper message. This is a very "stupid" implementation which simply checks for the existence of a ".gitmodules" file. Bug 300731 Bug 306765 Bug 308452 Bug 314853 Change-Id: I155aa340a85cbc5d7d60da31dba199fc30689b67 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
7047d2 2 lines CheckoutCommand: fix reflog message There is a space missing between <from> and "to" in the reflog message produced by the CheckoutCommand, which is of the form moving from <from> to <to> Change-Id: I3dc57ab0a6589292db77a17d9029ee9499dfc725 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
724af7 11 lines PullCommand: use default remote instead of throwing Exception When pulling into a local branch that has no upstream configuration, pull should try to used the default remote ("origin") instead of throwing an Exception. Bug 336504 Change-Id: Ife75858e89ea79c0d6d88ba73877fe8400448e34 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
73f36a 2 lines DirCacheCheckout: fix getToBeDeleted() This wrongly returns the same as getConflicts() Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Change-Id: Id37c625458fc5a9b3987f05b684620e24fdfe852
7668a4 128 lines PullCommand: support upstream configuration for local branches When creating a local branch based on another local branch, the upstream configuration contains "." as origin and the source branch as "merge". The PullCommand should support this by skipping the fetch step altogether and use the base branch to merge with. Change-Id: I260a1771aeeffca5b0161d1494fd63c672ecc2a6 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
7aa1b8 7 lines Rebase Interoperability first part: write "interactive" file The Repository is then in state "Rebase interactive". Change-Id: I5d2de57f8670e1d4c71ed22509ab17f04e2561b5 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
7bdef4 1643 lines Add "Branch" command The need for branching becomes more pressing with pull support: we need to make sure the upstream configuration entries are written correctly when creating and renaming branches (and of course are cleaned up when deleting them). This adds support for listing, adding, deleting and renaming branches including the more common options. Bug 326938 Change-Id: I00bcc19476e835d6fd78fd188acde64946c1505c Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
89a4dc 38 lines Checkout: fix handling if name does not refer to a local branch The CheckoutCommand does not handle names other than local branch names properly; it must detach HEAD if such a name is encountered (for example a commit ID or a remote tracking branch). Change-Id: I5d55177f4029bcc34fc2649fd564b125a2929cc4 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
920ac0 22 lines Allow to set a CredentialsProvider on relevant API commands This is needed for commands that use Transport internally. Change-Id: I9417c85255b160723968c647063b9c7e05995ea4 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
9b039b 24 lines Rebase: abort on unknown/unsupported command in git-rebase-todo This is needed to ensure interoperability with the command line: if the git-rebase-todo file was created manually (by git rebase -i in the command line), and any commands other than pick are used (reword, edit, fixup, squash) JGit must abort as it does not understand these commands yet. The same is true if an unknown command is found (e.g. due to a typo); this is the same behavior as shown by the command line. Change-Id: I2322014f69460361f7fc09da223e8a5c31f100dd Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
a5b36a 16 lines FetchCommand: allow to set "TagOpt" This is needed for implementing Fetch in EGit using the API. Change-Id: Ibdcc95906ef0f93e3798ae20d4de353fb394f2e2 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
ad9654 27 lines Rebase Interoperability third part: handle stop upon conflict There are some files that need to exist so that the CLI can continue after the rebase has been stopped due to conflicts Change-Id: I3cb4dc98609c059bf0cf9fd5f9e47a9c681cea2d Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
af31a9 40 lines CommitAndLogCommandTests: add a test for LogCommand.addRange() There were also some compiler warning due to empty catch blocks that were fixed. Change-Id: I165bcddcdfacd34f020d1b938a41954916eb106e Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
b15b9d 99 lines Proper handling of rebase during pull After consulting with Christian Halstrick, it turned out that the handling of rebase during pull was implemented incorrectly. Change-Id: I40f03409e080cdfeceb21460150f5e02a016e7f4 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
b73886 147 lines Fix missing Configuration Change eventing Configuration change events were not being triggered, now they are forwarded from the FileConfig up to the Repository's listeners. Change-Id: Ida94a59f5a2b7fa8ae0126e33c13343275483ee5 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
befeff 3 lines Fix JDK 6 Usage of String.getBytes(Charset) Change-Id: I619b00d8a3b0770c9fd1dc3314794f915ea80604 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
c1c130 139 lines Allow to read configured keys Currently, there is no way to read the content of the Git Configuration in a way that would allow to list all configured values generically. This change extends the Config class in such a way as to being able to get a list of sections and to get a list of names for any given section or subsection. This is required in able to implement proper configuration handling in EGit (show all the content of a given configuration similar to "git config -l"). Change-Id: Idd4bc47be18ed0e36b11be8c23c9c707159dc830 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
c544e9 4 lines TransportHttp wrongly uses JDK 6 constructor of IOException IOException constructor taking Exception as parameter is new for JDK 6. Change-Id: Iec349fc7be9e9fbaeb53841894883c47a98a7b29 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
db55d1 772 lines Add "Pull" command This is the minimal implementation of a "Pull" command. It does not have any parameters besides the generic progress monitor and timeout. It works on the currently checked-out branch and assumes that the configuration contains the keys "branch.<branch name>.remote" and "branch.<branch name>.merge" to determine the remote configuration for the fetch and the remote branch name for the merge. Bug 303404 Change-Id: I7fe09029996d0cfc09a7d8f097b5d6af1488fa93 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
e272ca 41 lines CheckoutResult: return paths instead of Files As discussed in http://egit.eclipse.org/r/#change,2127 we should use paths relative the working directory instead of Files to notify the caller about conflicts and nondeleted files. Change-Id: I034c7bd846f0df78d97bc246f38d411f29713dde Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
e5b96a 1016 lines Initial implementation of a Rebase command This is a first iteration to implement Rebase. At the moment, this does not implement --continue and --skip, so if the first conflict is found, the only option is to --abort the command. Bug 328217 Change-Id: I24d60c0214e71e5572955f8261e10a42e9e95298 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
e8a132 146 lines RebaseCommand: detect and handle fast-forward properly This bug was hidden by an incomplete test: the current Rebase implementation using the "git rebase -i" pattern does not work correctly if fast-forwarding is involved. The reason for this is that the log command does not return any commits in this case. In addition, a check for already merged commits was introduced to avoid spurious conflicts. Change-Id: Ib9898fe0f982fa08e41f1dca9452c43de715fdb6 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
f91ee9 7 lines Fix CheckoutCommandTest Change-Id: Ieacae01de20d7729ef34e6e6a1523fbaf9db41a8 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
fe76b4 2 lines TransportHttp does not honor timeout setting This can result in an infinitely hanging IDE. Change-Id: I669bc8d220a07011a42edf79de31825305ff3763 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
Matt Fischer (garmin.com)
995222 614 lines Implement server support for shallow clones This implements the server side of shallow clones only (i.e. git-upload-pack), not the client side. CQ: 5517 Bug 301627 Change-Id: Ied5f501f9c8d1fe90ab2ba44fac5fa67ed0035a4 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Mikael Karlsson (gmail.com)
15147a 7 lines Add user friendly output from jgit commit command Instead of printing the stack trace from the JGitInternalException thrown from CommitMessage.call(), print just the exception message, using the Die exception. Change-Id: I9ec3eb02eb001813fa15ac6f90a606223dcdafdc
Mykola Nikishov (notebook.(none))
956b12 126 lines Add org.eclipse.jgit-feature [sp: Externalized all strings for translation] Change-Id: Ib3f6e58e9e1cbcbc41705b6e1be37a89ca38f1a9 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Mykola Nikishov (mn.com.ua)
21b6f3 186 lines Method to get a 'humanish' name from a path Change-Id: Iec0688232bd59d4626111d77633109918e8e1df3 Signed-off-by: Mykola Nikishov <mn@mn.com.ua> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
5208e5 3 lines Add gitignore to constants Bug 291133 Change-Id: I24272d029cff446ffc80063870478577d628f338 Reviewed-by: Alex Blewitt <alex.blewitt@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
7eef83 11 lines Replace a hard-coded default remote's name with a constant Change-Id: I4e369382b8a83a5c0772462d1b176b1e23910ada
cf2edb 1931 lines Move AWT UI code to new org.eclipse.jgit.ui bundle This new UI bundle contains the org.eclipse.jgit.awtui package, which was moved out of the org.eclipse.jgit bundle. org.eclipse.jgit.pgm depends on org.eclipse.jgit.ui, so we need to update the classpath and make_jgit.sh to include it. This move takes the awtui classes out of the Maven build, which means we are no longer able to distribute these classes to our downstream Maven customers. The entire Maven package structure needs to be overhauled so that Eclipse bundle matches 1:1 with the Maven artifact. Bug: https://bugs.eclipse.org/291124 Change-Id: Ibf1a9968387e3d11fdce54592f710ec4cc7f1ddb Signed-off-by: Mykola Nikishov <mn@mn.com.ua> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
f8f75f 2 lines Ignore target/ folder and compile.org.eclipse.jgit.xml target/ is for Maven build output compile.org.eclipse.jgit.xml is generated on Export - Deployable Features Signed-off-by: Mykola Nikishov <mn@mn.com.ua> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I557a95792fd45c3cfe37098e057c1e70660b3308
291111 6126 bytes JGit needs a feature
org.eclipse.jgit.feature
Nico Sallembien (google.com)
0f95d2 58 lines Add a paranoid 'must be provided' option to ReceivePack By default a receive pack assumes that its user will only provide references to objects that the user already has access to on their local client. In certain cases, an additional check to verify the references point only to reachable objects is necessary. This additional checking is useful when the code doesn't trust the client not to provide a forged SHA-1 reference to an object, in an attempt to access parts of the DAG that they weren't allowed to see by the configured RefFilter. Change-Id: I3e4b8505cb2992e3e4be253abb14a1501e47b970 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
19126f 126 lines Allow users of ReceivePack access to the objects being sent When implementing branch read access, we need to prove that the newly created reference(s) point to objects that the user can see. There are two ways that an object is reachable: 1) It's reachable from a branch or change the user can see 2) It was uploaded as part of the pack file the user sent us This change adds additional methods in ReceivePack that will allow a server to check the above conditions, in order to ensure that a user is not trying to create a reference that they cannot see, or that a malicious user isn't attempting to forge the SHA-1 of an object that they cannot see in order to base a change off of it. Change-Id: Ieba75b4f0331e06a03417c37f4ae1ebca4fbee5a
e54d33 134 lines Add a RefFilter interface to ReceivePack and UploadPack When a user of ReceivePack or UploadPack wants to control what refs are sent to the client, for instance when some refs should be hidden from some clients, this interface can be extended to provide a fine grained control over what refs are sent to the client. Change-Id: Ie6320b0f8922e1a5e1bad91c016bd476ea094366
Per Salomonsson (psnet.nu)
d49530 48 lines Support for self signed certificate (HTTPS) Add possibility to disable ssl verification, just as i can do with git using: git config --global http.sslVerify false To enable the feature, configure Window->Preferences->Team->Git->Configuration and add a new key/value: http.sslVerify=false When handling repos over https, JGit will then check that flag to see if security is loose and the ssl verification should be ignored. Having it implemented as a key/value makes it not too obvious in the GUI - so the user must know what he/she is doing when adding it. Being aware of the risks etc. Bug 332487 Change-Id: I2a1b8098b5890bf512b8dbe07da41036c0fc9b72 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Philipp Thun (sap.com)
0b5ad2 451 lines Introduce FAILED result for RebaseCommand In case an underlying cherry-pick fails due to uncommitted changes, a RebaseCommand shall fail and roll-back changes. Change-Id: Ic22eb047fb03ac2c8391f777036b7dbf22a1b061 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
475672 2 lines Fix possible NPE in DirCache.isModified() The snapshot field of a DirCache object for a newly created repository can be null. This fix prevents a NPE when isModified() is called in such a situation. Change-Id: I61a1b45db2d60fdcc0f87373ac6fd75ac4c4a202 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
6736f3 541 lines Add further unit tests for IndexDiffFilter This change contains a bunch of unit tests for the newly introduced IndexDiffFilter. With these tests the code coverage of IndexDiffFilter.include() is now 100%, i.e. every special case is tested at least once. Change-Id: Ib248d1cd16084f9c8e099006af151814c63c5941 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
761b92 44 lines Do not categorize merge failures as 'abnormal' This change contains a simple renaming. Instead of using the expression 'abnormal failure', we just treat this kind of situation as 'failure'. This is specific enough as conflicts are already handled separately. Change-Id: I535acdc7d022543ed0f5ac6151b09a6985f4ef38 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
8e1b58 5 lines Make --git-dir optional for 'jgit init' For compatibility reasons with regards to native git and also to make the init command easier to use from the command line, argument --git-dir should not be required. Additionally the path created in case --git-dir is not supplied now is canonical and thus easier to read. Change-Id: Idb7d77e983a78c4b21fbf232fc1e75ef581e5ed1 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
a21e50 273 lines Introduce CherryPickResult In order to distinguish cherry-pick failures caused by conflicts vs. 'abnormal failures' (e.g. due to unstaged changes or a dirty worktree), a CherryPickResult class is introduced and returned by CherryPickCommand.call() instead of a RevCommit. This new class is similar to MergeResult and RebaseResult. The CherryPickResult contains all necessary information, e.g. paths causing the cherry-pick (a merge called within, respectively) to fail. This allows callers to better react on failures. Change-Id: I5db57b9259e82ed118e4bf4ec94463efe68b8c1f Signed-off-by: Philipp Thun <philipp.thun@sap.com> Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
a490af 1489 lines Add -o option to commit command This change adds the --only/ -o option to the commit command. Change-Id: I44352d56877f8204d985cb7a35a2e0faffb7d341 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
bab053 43 lines Do not rely on filemode differences in case of symbolic links When checking whether a file in the working tree has been modified - WorkingTreeIterator.isModified() - we should not trust the filemode in case of symbolic links, but check the timestamp and also the content, if requested. Without this fix symlinks will always be shown in EGit as modified files on Windows systems. Change-Id: I367c807df5a7e85e828ddacff7fee7901441f187 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
bf0510 162 lines Abort merge when file to be checked out is dirty In case a file needs to be checked out (from THEIRS) during a merge operation, it has to be checked if the worktree version of this file is dirty. If this is true, merge shall fail. Change-Id: I17c24845584700aad953c3d4f2bea77a0d665ec4 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
c0112f 4 lines Use parent directory in InitCommand if directory is "." If no directory is set before executing an InitCommand, the current directory (".") is used by default. By calling File.getParentFile() we get the actual directory this points to. Using this directory makes it easier to read paths. Change-Id: I6245941395dae920e4f90b8985be6ef3cce570d3 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
dcefc6 112 lines Refactor test cases This change moves commonly used methods into the RepositoryTestCase base class. Change-Id: I56a46c31ee1661c7ce22eb755ab23da8bc9f5da2 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
dcf7bd 81 lines Improve MergeResult Add paths causing abnormal merge failures (e.g. due to unstaged changes) to the MergeResult returned by MergeCommand. This helps callers to better handle (e.g. present) merge results. Change-Id: Idb8cf04c5cecfb6a12cb880e16febfc3b9358564 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
e24005 2 lines Fix DirCache.isModified() Change I61a1b45db2d60fdcc0f87373ac6fd75ac4c4a202 fixed a possible NPE occurring for newly created repositories - but in that case a wrong value (false = not modified) was returned. If a current version of the index file exists (liveFile), but there is no snapshot, this means that there have been modifications (i.e. true has to be returned). Change-Id: I698f78112249f9924860fc58eb7eab7afdf87eb7 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
fdb0a3 80 lines Refactor ResolveMerger 1. Perform an explicit check for untracked files. 2. Extract 'dirty checks' into separate methods 3. Clean up comments. 4. Tests: also check contents of files not affected by merge. Change-Id: Ieb089668834d0a395c9ab192c555538917dfdc47 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
Piotr Janik (gmail.com)
2e43e1 8 lines Add getConflicting() method in Status API Bug 345899 Change-Id: I133b9dd3e9a9c3c749547a884df3ce371929f38e Signed-off-by: Piotr Janik <janikpiotrek@gmail.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
7449b9 60 lines Fix path filtering in LogCommand Bug 346257 Change-Id: Ib897e1b4962162da9670164479a844aeea7dfcd1 Signed-off-by: Piotr Janik <janikpiotrek@gmail.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Roberto Tyley (guardian.co.uk)
602b2f 35 lines Tolerate zlib deflation with window size < 32Kb JGit currently identifies loose objects as 'corrupt' if they've been deflated using a window size less than 32Kb, because the isStandardFormat() function doesn't recognise the header byte as a zlib header. This patch makes the method tolerant of all valid window sizes (15-bit to 8-bit) - but doesn't sacrifice it's accuracy in distingushing the standard loose-object format from the experimental (now abandoned) format. It's based on a patch which has been merged into C-Git master branch: https://github.com/git/git/commit/7f684a2aff636f44a506 On memory constrained systems zlib may use a much smaller window size - working on Agit, I found that Android uses a 4KB window; giving a header byte of 0x48, not 0x78. Consequently all loose objects generated by the Android platform appear 'corrupt' :( It might appear that this patch changes isStandardFormat() to the point where it could incorrectly identify the experimental format a s the standard one, but the two criteria (b
6ac827 23 lines Provide access to the Refs of a PlotCommit This information is generally useful - have followed the accessor pattern of 'children' and 'parents' Change-Id: I79b3ddd6f390152aa49e6b7a4c72a4aca0d6bc72 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
afa7c7 4 lines Rename PlotWalk.getTags() to getRefs() Change-Id: I170685e70d9ac09a010df69d26ec1c38bde60174 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
b5f0a7 183 lines IndexPack: Use stack-based recursion for delta resolution Replace 'method' with 'heap'-based recursion for resolving deltas. Git packfile delta-chain depth can exceed 50 levels in certain files (the packfile of the JGit project itself has >800 objects with chain-length >50). Using method-based recursion on such packfiles will quickly throw a StackOverflowError on VMs with constrained stack. Benefits: * packfile delta-resolution no longer limited by the maximum number of stack frames permitted on the current thread. * slight performance improvement (3% speed increase on the packfile of the JGit project) Change-Id: I1d9b3a8ba3c6d874d83cb93ebf171c6ab193e6cc Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Roberto Tyley (gmail.com)
791a9f 142 lines Enable full Transport configuration for JGit API commands Add a TransportConfigCallback parameter to JGit API commands, to allow consumers of the JGit command API to perform custom Transport configuration that would be otherwise difficult to anticipate & expose on the API command builders. My specific use-case is configuring additional properties on SshTransport - I need to take over the SshSessionFactory used by the transport. Using TransportConfigCallback I can simply do this (rather than reimplement the API command classes): public void configure(Transport tn) { if (tn instanceof SshTransport) { ((SshTransport) tn).setSshSessionFactory(factoryProvider.get()); } } Adding an explicit setSshSessionFactory() method to the JGit command classes would bloat the API. Also, creating the replacement SshSessionFactory is unnecessary if the transport is not SSH, but the type of the Transport is only known once the remote has been resolved and the URI parsed - consequently it makes sense to perform this step in a callb
Robin Stocker (nibor.org)
14cc47 244 lines Add BranchTrackingStatus for getting remote tracking status This is used by EGit change I1e1caca561d1b0a0c194bfc42e64b698f42c6e6a to show branch status in decoration. It can also be used for providing the same output as C Git in "git status". Change-Id: I8d2b108c89905c3f0496f3d517879596740787c0 Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
258f51 16 lines Fix FindBugs and Eclipse warnings in org.eclipse.jgit.ui Change-Id: Ie6b3ff7d470cc9b7044fd6288cbf86dcc58220eb
2fb0f5 9 lines Make Repository.shortenRefName static The method has no reason to be non-static. Change-Id: I1c09e074395d49cee0e6e53679b499d1f0c351ea
315165 87 lines Refactor reading and writing heads in Repository Add private methods which are used for reading and writing MERGE_HEAD and CHERRY_PICK_HEAD files, as suggested in the comments on change I947967fdc2f1d55016c95106b104c2afcc9797a1. Change-Id: If4617a05ee57054b8b1fcba36a06a641340ecc0e Signed-off-by: Robin Stocker <robin@nibor.org>
3b44b2 5 lines Use entrySet() instead of keySet() The value was accessed every time in the loop body with get(), so use the more efficient entrySet(). Change-Id: I91d90cbd0b0d03ca4a3db986c58b8d80d80f40a4
3f7865 3 lines Remove two "Dead store to local variable" warnings Change-Id: I950de82db15c4610dc5a94f304279971daef971e
4fb185 53 lines PushCommand: Test for update of tracking branch Bug 317411 (Push does not update remote tracking branch) is assigned to JGit. This test verifies that JGit does the right thing. Bug 317411 Change-Id: I8f632e3e6c8a4f16a1170b1dba92e8fd3d6267d0
5dbef3 46 lines Add "Conflicts" section to merge message on conflict The same as with cherry-pick, the commit message of a merge should include a "Conflicts" section when the merge resulted in conflicts. Change-Id: I6261dc898262322924af5ca1bef841a654b0df55 Signed-off-by: Robin Stocker <robin@nibor.org>
6290ca 339 lines Format merge commit messages like C Git The automatically generated commit message of a merge should have the same structure as in C Git for consistency (as per git fmt-merge-msg). Before this change: merging refs/heads/a into refs/heads/master After: Merge branch 'a' Plurals, "into" and joining by "," and "and" also work. Change-Id: I9658ce2817adc90d2df1060e8ac508d7bd0571cb
69d7d1 199 lines Add RevWalkUtils with count(start, end) method It returns the number of commits that are in start and not in end. Useful for calculating how much a branch is ahead of another one. Change-Id: I09f7d9b049beea417da7ff32c9f8bf0d4ed46a7f Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6e10aa 213 lines Add CHERRY_PICK_HEAD for cherry-pick conflicts Add handling of CHERRY_PICK_HEAD file in .git (similar to MERGE_HEAD), which is written in case of a conflicting cherry-pick merge. It is used so that Repository.getRepositoryState can return the new states CHERRY_PICKING and CHERRY_PICKING_RESOLVED. These states, as well as CHERRY_PICK_HEAD can be used in EGit to properly show the merge tool. Also, in case of a conflict, MERGE_MSG is written with the original commit message and a "Conflicts" section appended. This way, the cherry-picked message is not lost and can later be re-used in the commit dialog. Bug 339092 Change-Id: I947967fdc2f1d55016c95106b104c2afcc9797a1 Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
7546e3 12 lines Fix "into" part of merge message for HEAD Merging into a non-master branch would result in the following message: Merge branch 'a' into HEAD Now the merge message is correct: Merge branch 'a' into b Change-Id: I488f97190e4c1711c23a7a3cbd64f8b13a87bbac Signed-off-by: Robin Stocker <robin@nibor.org>
770c73 45 lines PullCommand: Use short ref name in merge message Add a test case for PullCommand for the successful merge case and test that the short ref name is used. Change-Id: I16cbbc88595f73e5512f984e67f93f87ee0fe242 Signed-off-by: Robin Stocker <robin@nibor.org>
80a4ea 5 lines Make AbbreviatedObjectId serializable AmbiguousObjectException contains an AbbreviatedObjectId and is supposed to be serializable, so it should be serializable as well. Change-Id: I8056e78aee20fdd3cb9600b52cd8ed988544293d
8456cb 8 lines Adapt merge message to C Git for remote-tracking branch Commit 13931236b9ee2895a98ffdbdacbd0f895956d8a8 in C Git (2011-11-02) changed the message format: -Merge remote branch 'origin/foo' +Merge remote-tracking branch 'origin/foo' This change does the same in EGit to be consistent. Change-Id: I7d9c5afa95771dbfe6079b5f89a10b248fee0172 Signed-off-by: Robin Stocker <robin@nibor.org>
8a6356 4 lines Adapt expected commit message in tests Because of change I28ae5713, the commit message lost the "into HEAD" and caused the MergeCommandTest to fail. This change fixes it. Bug 336059 Change-Id: Ifac0138c6c6d66c40d7295b5e11ff3cd98bc9e0c
8cbed3 2 lines Make private final field static It's used as a constant. Change-Id: Ic267e8cb5b62228de15e134cd80725df592a0171
8db5b6 95 lines Add isSuccessful to MergeStatus, RebaseResult.Status and PullResult This is useful when the result needs to be displayed and it's only of interest if the operation was successful or not (in egit, it could be used in MultiPullResultDialog). Change-Id: Icfc9a9c76763f8a777087a1262c8d6ad251a9068 Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
90c11c 7 lines Exclude FindBugs warnings about Cloneable This was already disabled in the Eclipse preferences for the project. With this, Hudson should also ignore it. Change-Id: I7a6b9a20451dc5ba9a61553248b5f4b6c6c7a78b
96bea1 2 lines Use readFully() instead of read() Fixes the "Method ignores results of InputStream.read()" warning. This is the only place where read() was used instead of readFully() and the return value was not checked. So it was either an oversight or should be documented. This change assumes it was an oversight. Change-Id: I859404a7d80449c538a552427787f3e57d7c92b4
a00377 33 lines Fix Javadoc warnings There were some broken links, incorrect uses of @value, an invalid tag and an outdated comment. Change-Id: I22886bcc869a4b62bd606ebed40669f7b4723664 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
a31590 9 lines RevertCommand: Add "." after reverted commit id This makes the message look the same as in C Git (the "."): This reverts commit <sha1>. Change-Id: I4c254c122277b127e7b039c0d1c7f7a0d691530d Signed-off-by: Robin Stocker <robin@nibor.org>
a7a0e1 4 lines Fix FQCN of moved classes in FindBugsExcludeFilter.xml FindBugs would generate warnings for these even though they should be ignored. Change-Id: Ieccadbf11fd55853541c04857d8e79a4db014cb4
b0245b 13 lines Don't print "into HEAD" when merging refs/heads/master When MergeMessageFormatter was given a symbolic ref HEAD which points to refs/heads/master (which is the case when merging a branch in EGit), it would result in a merge message like the following: Merge branch 'a' into HEAD But it should print the following (as C Git does): Merge branch 'a' The solution is to use the leaf ref when checking for refs/heads/master. Change-Id: I28ae5713b7e8123a0176fc6d7356e469900e7e97
b52df1 2 lines Use Character.valueOf instead of new Character Otherwise a new Character is allocated each time instead of using the cache. Change-Id: I648d0b012f66ba9dc46a37a390986f9c61e5a19c
b70d88 7 lines Exclude FindBugs warning about uninitialized read This gets rid of the "Uninitialized read of blockIndex" warning. Change-Id: Ieb31b5059d7b9a6adff2251baf179bda5f82e7a5
c0f488 230 lines Add BranchConfig helper for access to branch config section Getting the name of the remote-tracking branch given a branch is not so easy to get right. This class provides a way to do that and could be used for more branch config related things (e.g. in PullCommand). Change-Id: I896a2384217936c8b672df8b81c9599f5c350458 Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
d36c80 3 lines Remove unnecessary null check The field monitor is never null, it's a NullProgressMonitor when not explicitly set. Change-Id: I8ce703a32c28ce5c3455efeb7ed5f5c9a443cbef
db35d9 6 lines Fix oddness check in MyersDiff for negative numbers It's probably not possible that these numbers are negative in the algorithm, but it's cleaner this way and gets rid of three more FindBugs warnings. Change-Id: Ifbce4e2c787fb9a7cd309c605e8d86211ef8a352
Roland Schulz (utk.edu)
ccd3d8 1153 lines Create RemoteSession interface The RemoteSession interface operates like a simplified version of java.lang.Runtime with a single exec method (and a disconnect method). It returns a java.lang.Process, which should begin execution immediately. Note that this greatly simplifies the interface for running commands. There is no longer a connect method, and most implementations will contain the bulk of their code inside Process.exec, or a constructor called by Process.exec. (See the revised implementations of JschSession and ExtSession.) Implementations can now configure their connections properly without either ignoring the proper use of the interface or trying to adhere to an overly strict interface with odd rules about what methods are called first. For example, Jsch needs to create the output stream before executing, which it now does in the process constructor. These changes should make it much easier to add alternate session implementations in the future. Also-by: John D Eblen <jdeblen@comcast.net> Bug 33674
Sasa Zivkov (sap.com)
13fffa 3 lines Registering the Checkout command and fixed a typo. The Checkout command line command was added to JGit but it wasn't registered in the list of available commands. Additionally, the 'force' option was named '---force' (triple '-'). Change-Id: I259773932fa9aec3bb29e215740e67c834566f6f Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
1993cf 1459 lines 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. Addi tionally, it is possible to have non-note entries
1a7c91 86 lines Implemented the git add commandline command. Implementation delegates all work to the AddCommand class and, therefore, supports only those options currently supported by the AddCommand which means: --update and the filepattern... arguments. Change-Id: I4827d37e08b4c988c2458d9ba60a61b6ad414d10 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
2ae9a8 1126 lines Provide NLS support in JGit. The support for NLS relies on java.util API to load a standard ResourceBundle and then uses java reflection API to inject localized strings into public String fields of the corresponding instance of TranslationBundle. Locale setting is supported per thread to enable concurrent threads to use different locales. This is useful when JGit runs in a server context where (error) messages might need to differ per-request to suit the user's preference. Change-Id: Ie0e63a0d7bb74eaad495dbe8248595d8a3a76883 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
3a8686 50 lines Detaching HEAD when checking out the same commit. Detaching HEAD didn't work in some corner checkout cases. If, for example, HEAD is symbolic ref to refs/heads/master, refs/heads/master is ref to commit c0ffee... then: checkout c0ffee... would leave the HEAD unchanged. The same symptom occurs when checking out a remote tracking branch or a tag that references the same commit as refs/heads/master. In the above case, the RefUpdate class didn't have enough information to decide if the update needed to detach symbolic ref because it dealt only with new/old objectIDs. Therefore, this fix introduced the RefUpdate.detachingSymbolicRef flag. Bug 315166 Change-Id: I085c98b77ea8f9104a213978ea0d4ac6fd58f49b Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
3c667b 105 lines Test root locale translations Ensures all translations exist in the root locale. Change-Id: Ic8a8bdfd4a06c6d1ebd1e85a8082a32c82d155c7
3e1a50 68 lines Show notes in Log CLI command - Part 2 This change fixes issues identified in the commit 5f3d577e5a1e8f23a2b6ea6a2bf24516806e01b8. Change-Id: Idbd935f5f60ad043faa0d4982b3e101ef7c07d60 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
5f3d57 130 lines Show notes in Log CLI command Support for --no-standard-notes and --show-notes=REF options is added to the Log command. The --show-notes option can be specified more than once if more than one notes branch should be used for showing notes. The notes are displayed from note branches in the order how the note branches are specified in the command line. However, the standard note, from the refs/notes/commits, is always displayed as first unless the --no-standard-notes options is given. Change-Id: I4e7940804ed9d388b625b8e8a8e25bfcf5ee15a6 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
65680d 15 lines Fixed several NPEs in the Fetch CLI The Fetch command line was failing with NPE in case some options were omitted. Additionally, it was setting a negative timeout when no timeout option was used which caused HttpURLConnection to throw an IllegalArgumentException. Change-Id: I2c67e2e1a03044284d183d73f0b82bb7ff79de95 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
7cd812 108 lines NoteMap implements Iterable<Note> We will need to iterate over all notes of a NoteMap, at least this will be needed for testing purposes. This change also implied making the Note class public. Change-Id: I9b0639f9843f457ee9de43504b2499a673cd0e77 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
832d3b 150 lines Exposed the constructor of Note class Additionally, defined the NoteMap.getNote method which returns a Note instance. These changes were necessary to enable implementation of the NoteMerger interface (the merge method needs to instantiate a Note) and to enable direct use of NoteMerger which expects instances of Note class as its paramters. Implementing creation of code review summary notes in Gerrit [1] will make use of both of these features. [1] https://review.source.android.com/#change,20045 Change-Id: I627aefcedcd3434deecd63fa1d3e90e303b385ac Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
966909 41 lines Include description for missing bundle prereqs When throwing MissingBundlePrerequisiteException we also include the short description, if available, of each missing object. This is the fix for the following issue: http://code.google.com/p/egit/issues/detail?id=25 Change-Id: I5d45aec7873af76a12170d9a500626a7264f2c42 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
990498 4 lines Fixed NLS in JGit command line interface There was one place where the parameter substitution wasn't done which caused text fragments like "{0}" to appear in JGits output. Bug 325025 Change-Id: I89b881a8b5ef39f609437546310463ed4f6e1fb5 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
99ab22 1 lines Don't create .git/remotes folders on init For historical reasons JGit was creating .git/remotes folder when initialization an empty repository. However, this folder is never used and the new Git repository format doesn't contain them. Removed the unnecessary remotes folder creation, it was removed from C Git in 75c384efb52d ("Do not create $GIT_DIR/remotes/ directory anymore") by Junio C Hamano on Dec 19 2006. C Git hasn't made it for almost 3 years. Change-Id: I5473f3676a3642afdf9aaac44b7e6319c6e170b9 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
d7ca89 58 lines Using java.util.concurrent in NLSTest instead of handling threads directly. A test in NLSTest was mixing the "old" and the "new" way of handling concurrency. This change makes use of the java.util.concurrent facilities to control concurrency and removes the code that was directly dealing with Thread objects. Change-Id: Ie7267776e988a48a5443f0f3fe4eb43e79eee4b1 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
f3d8a8 3773 lines Externalize strings from JGit The strings are externalized into the root resource bundles. The resource bundles are stored under the new "resources" source folder to get proper maven build. Strings from tests are, in general, not externalized. Only in cases where it was necessary to make the test pass the strings were externalized. This was typically necessary in cases where e.getMessage() was used in assert and the exception message was slightly changed due to reuse of the externalized strings. Change-Id: Ic0f29c80b9a54fcec8320d8539a3e112852a1f7b Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
304689 36552 bytes Provide NLS support in JGit.
Provide NLS support in JGit.
Sascha Scholz (gmail.com)
a1f877 53 lines Load .gitmodules config before adding values to it This prevents existing entries from being cleared when the .gitmodules config is saved after the new submodule configuration is added. Change-Id: I66841f5e758a7527e2e6e25cf1318e5fea91a909 Signed-off-by: Kevin Sawicki <kevin@github.com>
Tomasz Zarna (pl.ibm.com)
0705e9 7 lines Do not import/export empty org.eclipse.jgit package The package was removed in I763590a45d75f00a09097ab6f89581a3bbd3c797 Change-Id: Ifa9e75714f85d17609f9bf61581aaed0631a6fa7 Signed-off-by: Kevin Sawicki <kevin@github.com>
1a2ca5 261 lines Skip a number commits before starting to show the commit output Change-Id: Id2666d897d29b6371f7a6cf241cfda02964b4971 Signed-off-by: Kevin Sawicki <kevin@github.com>
1efeca 1 lines Merge in JGit CLI is missing break statement Change-Id: I2095601b848e66e54d5dac828ef6ed1a4c5ae66c Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
23e0a3 193 lines Add config --list command to pgm Currently, only --list option is supported with --global, --system, --local and --file switches. Change-Id: I9b179b162996520e95c4e001dccd65c566a4bd27 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
248959 226 lines Limit the number of commits in LogCommand output Bug 316680 Change-Id: I88cf7aac6b5763cc94421433dd4bbd42f81e0e69
2b3d48 6 lines Stream left open in WorkingTreeIterator#filterClean Change-Id: I17c2709f2613536c02c9ea2977d936b87029ac0d
3fa054 58 lines Workaround incompatible refactoring in Jetty 7.6.0 In Jetty 7.6 package org.eclipse.jetty.http.security was renamed to org.eclipse.jetty.util.security [1] breaking compatibility. Compare docs for the package in 7.5.4 [2] and missing part in 7.6.0 [3]. To fix until we switch to Jetty 8, restrict the maximum version to 7.6.0 exclusive. [1] http://dev.eclipse.org/mhonarc/lists/jetty-dev/msg01175.html [2] http://download.eclipse.org/jetty/7.5.4.v20111024/apidocs/ [3] http://download.eclipse.org/jetty/7.6.0.RC4/apidocs/ Change-Id: I82b107ec76e66367e55e2cc20233a7924bf7be9f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
440d7f 7 lines Enable test methods in CommitAndLogCommandTests Change-Id: I52bbf19416cba42340004f0235e17a436cad1058 Bug 339086 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
4e1de3 111 lines Add @Override annotations to enums Change-Id: I8fa3b89a6349c1231251b346cae12c1c4f095929
5d95cd 23 lines Add constant for default name for the Git repo configuration Change-Id: I5a6ef686c444fb1e46c9f784bad01165471ef372 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5f787b 220 lines Add DeleteTagCommand to JGit API Bug 353226 Change-Id: I54ae237cab792742333a249eb5a774d5e1775af8 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
617c5d 160 lines Sort translation bundle keys in alphabetical order. Change-Id: I83e26531ea924178ba43fa82b3c1fe02afd23eca Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
622232 10 lines Externalize parsing exception message for RebaseCommand#Action Change-Id: Id0d7801e4de98bf118dbecadf623c9ffd7ab7554
69a568 92 lines Add options for setting context lines and prefixes to DiffCommand Change-Id: I539f3531e94c11c0f0a3e7096c0eb1b1c309898a
6d293c 3 lines Don't hard-code section names, use ConfigConstants instead Change-Id: Ie2dde43da491fa27b25a2ad8014866d77d484b24 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7017c6 27 lines Allow to list tags with org.eclipse.jgit.pgm.Tag Change-Id: I79c284a720935814aef9767156106833f983bb8b
714a3e 299 lines Add DiffCommand to JGit API Bug 334766 Change-Id: Iea74c599a956a058608e424d0274f879bc2f064a
8c6046 5 lines Allow to amend commits with JGit CLI Change-Id: I0e8d365b56e079ac4ccece7fcf80ea140c319c78
8f8e43 10 lines Fix typo in RebaseResult#mySatus Change-Id: I88d34eec8307231f89343ead06858d1df4ac0886
90c96e 14 lines Fix boxing warnings in PushProcessTest Change-Id: I5114968536853fb530b8a96c10def675e39c884f
90d002 23 lines Remove ambiguous CheckoutConflictException Checkout command should throw o.e.j.api.errors.CheckoutConflictException which is a GitAPIException not o.e.j.errors.CheckoutConflictException. PullCommand should rethrow the API exception as a JGitInternalException. Bug 356922 Change-Id: I865c4905997d9834c85a97fbe7287604daf99075 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
92f90e 807 lines Add ApplyCommand to JGit API Bug 361548 CQ: 6243 Change-Id: I08e1369e142bb19f42a8d7bbb5a7d062cc8533fc Signed-off-by: Chris Aniszczyk <zx@twitter.com>
94285e 13 lines Add --all switch to org.eclipse.jgit.pgm.Commit Change-Id: Iab52f995676daf60e0dfa043cc9e022f6e32a758 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
9c7371 58 lines Allow to get end-of-line characters for a RawText Bug 370320 Change-Id: I18adc63596f4657516ccc6d704a561924c79d445 Signed-off-by: Kevin Sawicki <kevin@github.com>
9f6613 5 lines StatusCommand#setWorkingTreeIt should return 'this' All setters for JGit API commands return the command instance, follow the builder pattern. Change-Id: Id2bbc3f1300bb179887c4d2d6dd72925bde55f24 Signed-off-by: Kevin Sawicki <kevin@github.com>
9fbda2 17 lines Add setCredentialsProvider to PullCommand Bug 335703 Change-Id: Id9713a4849c772e030fca23dd64b993264f28366 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
a2dac2 1305 lines Allow to write tests with CLI syntax CQ: 6385 Bug 365444 Change-Id: I2d5164cd92429673fe3c37e9f5f9bc565192cc12 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
acd8ae 145 lines DiffFormatter#format(List) fails unless #scan(ATI, ATI) is called first Bug 354919 Change-Id: I710394fe6675e0e5aa66d9118c5b10d433aa30ea
bf845c 1305 lines Allow to write tests with CLI syntax Bug 365444 Change-Id: I86f382913bc47665c5b9a2827b878e7dbedce7b1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
c35c23 11 lines Use JGitText.refAlreadyExists instead of "ref exists" Change-Id: I113bcf82c6292db5269271f799d09c80acc40bcd
c638f7 5 lines Export all packages from org.eclipse.jgit.pgm Change-Id: I90565c8626aa5ab58ed3ff1dafa8bd21c9a79c62
c75aa1 38 lines LogCommand#setMaxCount affects all commits Bug 370132 Change-Id: I9f5ff3640a4f69c0b48c97609728d7672e63e6ab Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Chris Aniszczyk <zx@twitter.com>
cda640 45 lines Allow to amend a commit with CommitCommand Bug 339088 Change-Id: I57dc727688c4bb6968ac076b176661c857c05afa Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
dcb7e4 4 lines Wrong constant used when configuring a repository Bug 337546 Change-Id: Ib2f31d621caa5f8b24ce74ce82499889d4f30550
e15037 43 lines Merge doesn't remove empty folders Bug 349848 Change-Id: I2aa5a1a7259889428e4845046b900538262f3c84
e5633b 4 lines Fix two typos in CLIText.properties Change-Id: Id1429d52c88a9e2b888e6c6906cf8148945bd2ca
eb5df5 13 lines Add toString() to HunkHeader Since FileHeader provides toString() method (via DiffEntry) we could add a similar method to HunkHeader. Change-Id: I7886e5b8f775fa8e8478ac5af37d90b6ef677d8b
eedd77 23 lines RawText#getEOL() does the same thing as RawText#getLineDelimiter() The duplication has been introduced when merging I08e1369e142bb19f42a8d7bbb5a7d062cc8533fc and I18adc63596f4657516ccc6d704a561924c79d445. The former should have been manually rebased. It also missed a copyright update in ApplyCommandTest. Change-Id: I18fe6108220f964524fb16b719604222aa7abee6
ef98c3 14 lines Cleanup MergeResult constructors 'mergeStrategy' should be 5th argument, after 'mergeStatus'. Pass 'description' if available. Change-Id: I97cebfe5d7db6247fe899075d917b82955906f85 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
f1945c 18 lines Add getters for old and new prefixes in DiffFormatter Bug 370318 Change-Id: Iaf9282ba55ee3bb4e2c27fb71c598b308771bf57
f78e52 20 lines Add setter for ProgressMonitor to DiffCommand Change-Id: I34f8b77a461e165d7d624dbd9a6944feadc57b8e

Repositories

The information contained in this log was generated by using commit information from the following repositories:

/gitroot/jgit/jgit.git