summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge "RecursiveMerger should not fail on content-merge conflicts of parents"Christian Halstrick2014-07-294-9/+134
|\ \
| * | RecursiveMerger should not fail on content-merge conflicts of parentsChristian Halstrick2014-07-284-9/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when RecursiveMerger was trying to create a single virtual common base for the merge it was failing when this lead to content-merge conflicts. This is different from what native git is doing. When native git's recursive merge algorithm creates a new common base it will merge the multiple parents and simply take the merge result (potentially including conflict markers) as common base. See my discussion with Shawn here: http://www.spinics.net/lists/git/msg234959.html : > - How should workingtree, index (stage1,2,3) look like if during that > merge of common ancestors a conflict occurs? Will I see in stage2 and > stage3 really see content of X1 and X2? Its done entirely in memory and never touches the working tree or index. When a conflict exists in the X1-X2 merge the conflict is preserved into the new virtual base. There is still the possibility that the merge of parents lead to conflicts. File/Folder conclicts, conflicts on filemodes. This commit only fixes the situation for conflicts when merging content. Bug: 438203 Change-Id: If45bc3d078b3d3de87b758e71d7379059d709603
* | | Strip trailing /s in repo base URI.Yuxuan 'fishy' Wang2014-07-283-3/+9
|/ / | | | | | | | | Change-Id: I71040db2cca69638cfad89acdc9179ee80592b27 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | Fixed message for exception thrown during recursive mergeChristian Halstrick2014-07-283-4/+4
| | | | | | | | | | | | | | | | | | | | During recursive merge jgit potentially has to merge multiple common ancestors. If this fails because there are conflicts then the exception thrown for that should have a message which states this clearly. Previously a wrong message was given ("More than 200 merge bases ...") Change-Id: Ia3c058d5575decdefd50390ed83b63668d31c1d1
* | Fix RecursiveMerger's internal use of merge to find a merge baseChristian Halstrick2014-07-254-1/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When RecursiveMerger tried to determine a common base tree it was recursively tried to merge multiple common bases. But these intermediate merges which have just been done to determine a single common base for the final merge already filled some important fields (toBeCheckedOut, toBeDeleted, ...). These side effects of the intermediate merges led to wrong results of the final merge. One symptom was that after a recursive merge which should be succesful you could still see leftover files in the worktree: files which existed in the (virtual) common base but which don't exist anymore in the branches to be merged. The solution is easy: Clear the appropriate fields after common base determination and start the final merge with a clean state. Change-Id: I644ea9e1cb15360f7901bc0483cdb9286308c226 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | Handle initial checkout correctlyChristian Halstrick2014-07-252-4/+30
|/ | | | | | | | | | As described in native gits file "git-read-tree.txt" git has in a special mode when doing the "initial" checkout. "Initial" means that the index is empty before the checkout. This was not handled correctly in JGit and is fixed in this commit. Also see https://github.com/git/git/blob/master/Documentation/git-read-tree.txt#L181 Change-Id: I9b9d1bd9ebf349cfca420c891c7b099a18d07ba4
* Update SUBMITTING_PATCHESRobin Stocker2014-07-202-106/+44
| | | | | | | | | | | It contained outdated information about attaching patches to bug reports. Shorten it to the essentials. Also format it using markdown and rename it to CONTRIBUTING.md, which is a convention and doesn't include "patches" in the name. Change-Id: I9ee73f16e6fa8fbf529ac0ca791e2375d4d56d68 Signed-off-by: Robin Stocker <robin@nibor.org>
* Don't prefix output from jgit status with '# 'Robin Rosenberg2014-07-192-76/+76
| | | | | | C Git does not do it anymore Bug: 439937 Change-Id: I20bdb787a00bba3e4adf269fd64ec6296bdc2a66
* Preserve merges during pull if configured to do soKonrad Kügler2014-07-153-23/+256
| | | | | | | | | | Setting branch.<name>.rebase or pull.rebase to 'preserve' will preserve merges during rebase. Also, pull.rebase is now consulted if there is no branch-specific configuration. Bug: 429664 Change-Id: I345fa295c7e774e0d0a8e6aba30fbfc3552e0084 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* Rebase: Add --preserve-merges supportKonrad Kügler2014-07-153-30/+560
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With --preserve-merges C Git re-does merges using the rewritten merge parents, discarding the old merge commit. For the common use-case of pull with rebase this is unfortunate, as it loses the merge conflict resolution (and other fixes in the merge), which may have taken quite some time to get right in the first place. To overcome this we use a two-fold approach: If any of the (non-first) merge parents of a merge were rewritten, we also redo the merge, to include the (potential) new changes in those commits. If only the first parent was rewritten, i.e. we are merging a branch that is otherwise unaffected by the rebase, we instead cherry-pick the merge commit at hand. This is done with the --mainline 1 and --no-commit options to apply the changes introduced by the merge. Then we set up an appropriate MERGE_HEAD and commit the result, thus effectively forging a merge. Apart from the approach taken to rebase merge commits, this implementation closely follows C Git. As a result, both Git implementations can continue rebases of each other. Preserving merges works for both interactive and non-interactive rebase, but as in C Git it is easy do get undesired outcomes with interactive rebase. CommitCommand supports committing merges during rebase now. Bug: 439421 Change-Id: I4cf69b9d4ec6109d130ab8e3f42fcbdac25a13b2 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* Repository.writeMergeHeads to accept a list with subtypes of ObjectIdKonrad Kügler2014-07-141-2/+2
| | | | | | Allows to pass for example a List<RevCommit>. Change-Id: I5522707060d7d3e0d848ba579956dc62f8fa0234 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* Cherry-Pick: Support --no-commitKonrad Kügler2014-07-142-8/+73
| | | | Change-Id: Ic4c313a8971a5aa15745518c49e2587a1a0fe8d4 Signed-off-by: Konrad Kügler <swamblumat-eclipsebugs@yahoo.de>
* Handle diff formatting when there is nothing to compare withRobin Rosenberg2014-07-063-19/+124
| | | | | | | | DiffFormatter now suports either side being null and the log program will output the diff for the first commit. Bug: 395791 Change-Id: I378957b57e9ad1f7195ba416f402178453f0ebd3
* Eliminate warning about overlapping variable namesRobin Rosenberg2014-07-041-5/+5
| | | | Change-Id: I7e749092c5b51e2857c186088e2c5c6c6d295367
* Don't warn for methods that can be staticRobin Rosenberg2014-07-0215-15/+15
| | | | | | | | Making the methods static would gain little in performance, make the code harder to change. Removing unncessary warnings is more important. Change-Id: If3e6aa9c1d92e58b4e7a8e246cf4aace237d7a7b
* Add new default settings from Eclipse 4.4Robin Rosenberg2014-07-0216-1/+81
| | | | | | | | These settings were added by Eclipse simply by touching the project settings. Adding these makes it simpler to see what local changes have been made. Change-Id: Iab0aa62530312eb0c78b03b5c6a632742bcc4978
* Merge "Clarify comments in message properties files (and fix grammar)"Matthias Sohn2014-07-012-3/+3
|\
| * Clarify comments in message properties files (and fix grammar)Robin Stocker2014-06-302-3/+3
| | | | | | | | | | | | Bug: 438261 Change-Id: I7b98475886ef789ae7635d8c9e008fc1aa00d534 Signed-off-by: Robin Stocker <robin@nibor.org>
* | Try to fix intermittent test failure related to file timestampsRobin Rosenberg2014-07-011-3/+4
|/ | | | | | | | | | Improve how tests do a "touch" operation on files. Instead of doing "f.setLastModified(System.currentTimeMillis)" open a Outputstream on the file and directly close it again. This makes this method rely only on one clock - the clock of the filesystem. Bug: 436917 Change-Id: I68ef3c2878f28b12daebf2ef6a9fa0a5d6e0964d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix incorrect "''" in CLIText.propertiesRobin Stocker2014-06-301-1/+1
| | | | | | | | This message is not processed by MessageFormat. Bug: 438261 Change-Id: If75d8f3cd3f356a56623eee96b64e8845de5eb38 Signed-off-by: Robin Stocker <robin@nibor.org>
* Add a comment to the message properties files on how they are processedRobin Rosenberg2014-06-292-0/+8
| | | | Change-Id: I073f0c2c0729e6a5d3f1834203f0cfeb4c462eda
* Fix spelling error in error messgaeRobin Rosenberg2014-06-291-1/+1
| | | | Change-Id: I5f712ba290592f7c5aa9ee865ff30383ad315247
* Remove duplicate string in CLIText.propertiesRobin Rosenberg2014-06-291-1/+0
| | | | | Bug: 438261 Change-Id: Idd6839465ea36d072b1c4393f5abd2f39da02b62
* Fix formatting errors in error messagesRobin Rosenberg2014-06-292-8/+8
| | | | | | | | | {} is plain wrong and is not accepted by MessageFormat, the other risk becoming wrong if another single quote is introduced in the future and sets a bad example. Bug: 438261 Change-Id: I2948ca90c10f6ec2574f7f2b9be0a72821ea4daf
* Merge branch 'stable-3.4'Matthias Sohn2014-06-216-12/+108
|\ | | | | | | | | | | | | | | | | | | * stable-3.4: Prepare 3.4.2-SNAPSHOT builds JGit v3.4.1.201406201815-r Allow retrying connecting SshSession in case of an exception Change-Id: I7efb009b9e012637a16c57e2e93e074023b8e46c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 3.4.2-SNAPSHOT buildsMatthias Sohn2014-06-2155-263/+263
| | | | | | | | | | Change-Id: If88217d84b88cda6d04c159418d5bc86233fe28c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v3.4.1.201406201815-rv3.4.1.201406201815-rMatthias Sohn2014-06-2155-263/+263
| | | | | | | | | | Change-Id: I4383a90fd91a243cd5ce5d0ae4e53874b36c1f47 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Allow retrying connecting SshSession in case of an exceptionStefan Lay2014-06-206-12/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Connecting to an SshSession may fail due to different reasons. Jsch for example often throws an com.jcraft.jsch.JschException: verify: false.[1] The issue is still not fixed in JSch 0.1.51. In such a case it is worth retrying to connect. The number of connection attempts can be configured using ssh_config parameter "ConnectionAttempts" [2]. Don't retry if the user canceled authentication. [1] http://sourceforge.net/p/jsch/bugs/58/ [2] http://linux.die.net/man/5/ssh_config Bug: 437656 Change-Id: I6dd2a3786b7d3f15f5a46821d8edac987a57e381 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Remove no longer needed API breakage filtersRobin Rosenberg2014-06-151-19/+0
| | | | | | | | Change-Id: I2ea2dec55c187b62662195bae810b3f0af8a2983
* | Remove an unnecessary semicolonRobin Rosenberg2014-06-151-1/+1
| | | | | | | | Change-Id: I6c5b085ae4a47d0026bd2b2341de76ab333936b9
* | Remove an unnecessary $NON-NLS$ commentRobin Rosenberg2014-06-151-1/+1
| | | | | | | | Change-Id: I8335464061dac1c20de2b698f834e516ef78cf3d
* | Merge "Enable NLS / TranslationBundle to be used in OSGi"Robin Rosenberg2014-06-151-6/+10
|\ \
| * | Enable NLS / TranslationBundle to be used in OSGiRüdiger Herrmann2014-06-011-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TranslationBundle#load() used to load resource bundles through ResourceBundle#getBundle() without explicitly specifying a class loader. In this case, the class laoder of the calling class (TranslationBundle here) is used. This approach fails in runtime environments like OSGi where there are multiple class loaders. This change enables loading resource bundles in multi class loaders environments. The fix is to pass the class loader of the TranslationBundle-derived class to ResourceBundle#getBundle(). Bug: 436232 Change-Id: I39db61e012dc93ebf388a71bf6088a3310a22bac Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
* | | Don't set REWRITE flag unless parent rewriting is requestedDave Borowitz2014-06-121-5/+7
| | | | | | | | | | | | Change-Id: I65e3702ceb6c8854a2c358cfc2c2e3a9fb9486ff
* | | Rename RewriteTreeFilter to TreeRevFilter and make it publicDave Borowitz2014-06-124-20/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current behavior of passing a TreeFilter to RevWalk has limited usefulness, since the RevFilter derived from the TreeFilter is always ANDed together with any other RevFilters. It is also tied fairly tightly to the parent rewriting mechanism. Make TreeRevFilter a generic RevFilter that matches modified paths against any TreeFilter. This allows for more complex logic like (modified this path OR authored by this person). Leave the rewrite flag logic in this class, since it's closely tied to the parent comparison code, but hidden behind a protected constructor. Change-Id: Ia72ef591a99415e6f340c5f64583a49c91f1b82f
* | | Add missing javadoc and since tag for RepoCommand.readFileFromRepo()Matthias Sohn2014-06-121-0/+14
| | | | | | | | | | | | Change-Id: Ib0a98ce633e83c82a58b633c767e70d316b7254c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge "Refactor DefaultRemoteReader for easier code reuse"Dave Borowitz2014-06-111-1/+9
|\ \ \
| * | | Refactor DefaultRemoteReader for easier code reuseYuxuan 'fishy' Wang2014-06-101-1/+9
| | | | | | | | | | | | | | | | | | | | Change-Id: I7f326b4fc96198de7b424e15d8329bde7d7b39cf Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | | | Merge branch 'stable-3.4'Matthias Sohn2014-06-110-0/+0
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| | | | | | | | | | | | | * stable-3.4: Prepare post 3.4.0 builds JGit v3.4.0.201406110918-r Change-Id: I1aa3b911c7ace01b82ab9844eec5432d4125b726 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare post 3.4.0 buildsMatthias Sohn2014-06-1155-59/+59
| | | | | | | | | | | | Change-Id: I49f3741f3973b247a635f7c99b72309d2381a377 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v3.4.0.201406110918-rv3.4.0.201406110918-rMatthias Sohn2014-06-1155-59/+59
| | | | | | | | | | | | | | | Change-Id: I56543234316f04bff4e45628bcb8286a6e52e31f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge "Fixed the problem with calling LsRemoteCommand without a local ↵Robin Rosenberg2014-06-104-1/+50
|\ \ \ | | | | | | | | | | | | repository over the ssh and git:// protocols."
| * | | Fixed the problem with calling LsRemoteCommand without a local repository ↵Anton Bannykh2014-06-084-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | over the ssh and git:// protocols. Bug: 436695 Change-Id: Ifd69fbc04156fa4dacdcba6225768f43843eee97 Signed-off-by: Anton Bannykh <anton.bannykh@gmail.com> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* | | | Add missing @since to RepoCommand.setInputStreamRobin Rosenberg2014-06-101-2/+3
| | | | | | | | | | | | | | | | Change-Id: I2fa1a5c28a1521a837aeaeb994e5cce8d7c4e645
* | | | Added setInputStream to RepoCommand.Yuxuan 'fishy' Wang2014-06-093-31/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes an input stream is more useful than the filename of the xml manifest. Change-Id: Icb09ac751b3d8d7eb14427ad1aac8cee0c371c5f Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | | | Merge "Better way to handle relative URLs in manifest XML"Dave Borowitz2014-06-091-2/+2
|\ \ \ \
| * | | | Better way to handle relative URLs in manifest XMLYuxuan 'fishy' Wang2014-06-051-2/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old implementation will NOT strip the filename part from the baseUrl, e.g. https://android.googlesource.com/platform/manifest with .. will be resolved to https://android.googlesource.com/platform/, which is actually wrong. This implementation will resolve it to https://android.googlesource.com/ to match the behavior of repo. Change-Id: Ia32c8b34e16eacdf37a0da7025bf0b5cc5f67ed2 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
* | | | LsRemoteCommand - internal execute need not be protectedRobin Rosenberg2014-06-081-1/+1
| | | | | | | | | | | | | | | | Change-Id: I04d054d9f19e4ee200f72b25962be4759cfe5d7e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Enable passing version number to maven central scriptsMatthias Sohn2014-06-062-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also check if the passed version matches the version pattern <major>.<minor>.<micro>.<qualifier>-<classifier> Change-Id: Ib7edf51fb5e89232909611de5b4811a62b4f3953 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Merge "Fix DeltaTask infinite loop"Robin Rosenberg2014-06-061-1/+1
|\ \ \ \