summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorChristian Halstrick <christian.halstrick@sap.com>2014-10-10 00:00:45 +0200
committerChristian Halstrick <christian.halstrick@sap.com>2014-10-10 00:00:45 +0200
commit441fdb54ef05bbe58c61d562b331d606b0edd783 (patch)
tree3555e7e31d4b789c73944662af34972ef95a5ce8 /org.eclipse.jgit
parent9fd1325ecbdfaa41965782166e77d0dc8dd936ec (diff)
downloadjgit-441fdb54ef05bbe58c61d562b331d606b0edd783.tar.gz
jgit-441fdb54ef05bbe58c61d562b331d606b0edd783.zip
When marking commits as uninteresting don't care if the tree exists
When during an ObjectWalk commits are marked as uninteresting we should be tolerant against the situation that the commit exists in the repo but the referenced tree is not exisiting. Since commit c4797fe98655b3d52d0a90ba44fce6e053db3b8b we are throwing MissingObjectException in such a case. This semantic differs from native git behaviour and may cause push operations to fail while they would work in native git. See: http://dev.eclipse.org/mhonarc/lists/egit-dev/msg03585.html Bug: 445744 Change-Id: Ib7dec10fd2ef1adbb8adbabb9d3d5a64e554286a
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java
index ef96b77c5f..b73ccb1974 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java
@@ -246,7 +246,11 @@ public class ObjectWalk extends RevWalk {
public void markUninteresting(RevCommit c) throws MissingObjectException,
IncorrectObjectTypeException, IOException {
super.markUninteresting(c);
- markTreeUninteresting(c.getTree());
+ try {
+ markTreeUninteresting(c.getTree());
+ } catch (MissingObjectException e) {
+ // we don't care if the tree of the commit does not exist locally
+ }
}
@Override