Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.io.File;
import java.text.DateFormat;
import java.util.Date;
import org.eclipse.jgit.errors.AmbiguousObjectException;
import org.netbeans.modules.git.client.GitClient;
import org.netbeans.libs.git.GitException;
import org.netbeans.libs.git.GitRevisionInfo;
Expand Down Expand Up @@ -182,7 +183,7 @@ public void run () {
mergedStatus = commonAncestor != null && commonAncestor.getRevision().equals(revisionInfo.getRevision());
}
} catch (GitException ex) {
if (!(ex instanceof GitException.MissingObjectException)) {
if (!(ex instanceof GitException.MissingObjectException || ex.getCause() instanceof AmbiguousObjectException)) {
GitClientExceptionHandler.notifyException(ex, true);
}
revisionInfo = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
# under the License.

MSG_Exception_IdNotACommit = The given id [{0}] is not a commit or an annotated tag.
MSG_Exception_IdNotUnique = Given objectId [{0}] is not unique.
MSG_Exception_IdAmbiguous = The given objectId [{0}] is ambiguous.
2 changes: 1 addition & 1 deletion ide/libs.git/src/org/netbeans/libs/git/jgit/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public static ObjectId parseObjectId (Repository repository, String objectId) th
} catch (RevisionSyntaxException ex) {
throw new GitException.MissingObjectException(objectId, GitObjectType.COMMIT, ex);
} catch (AmbiguousObjectException ex) {
throw new GitException(MessageFormat.format(Utils.getBundle(Utils.class).getString("MSG_Exception_IdNotACommit"), objectId), ex); //NOI18N
throw new GitException(MessageFormat.format(Utils.getBundle(Utils.class).getString("MSG_Exception_IdAmbiguous"), objectId), ex); //NOI18N
} catch (IOException ex) {
throw new GitException(ex);
}
Expand Down
Loading