From a50ed5666ff41b2b08d09adffad5368b33871e45 Mon Sep 17 00:00:00 2001 From: Robin Stocker Date: Fri, 19 Apr 2013 19:44:24 +0200 Subject: status: Print conflict description for unmerged paths Prefix unmerged paths with conflict description (e.g. "both modified:"), the same way C Git does. Change-Id: I083cd191ae2ad3e2460aa4052774aed6e36c2699 --- org.eclipse.jgit/src/org/eclipse/jgit/api/Status.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'org.eclipse.jgit/src/org/eclipse/jgit') diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/Status.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/Status.java index cb2ae6bf01..e840c2f608 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/Status.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/Status.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011, Christian Halstrick + * Copyright (C) 2011, 2013 Christian Halstrick * and other copyright owners as documented in the project's IP log. * * This program and the accompanying materials are made available @@ -43,9 +43,11 @@ package org.eclipse.jgit.api; import java.util.Collections; +import java.util.Map; import java.util.Set; import org.eclipse.jgit.lib.IndexDiff; +import org.eclipse.jgit.lib.IndexDiff.StageState; /** * A class telling where the working-tree, the index and the current HEAD differ @@ -152,6 +154,14 @@ public class Status { return Collections.unmodifiableSet(diff.getConflicting()); } + /** + * @return a map from conflicting path to its {@link StageState}. + * @since 3.0 + */ + public Map getConflictingStageState() { + return Collections.unmodifiableMap(diff.getConflictingStageStates()); + } + /** * @return set of files and folders that are ignored and not in the index. */ -- cgit v1.2.3