diff options
author | Robin Stocker <robin@nibor.org> | 2013-04-19 19:44:24 +0200 |
---|---|---|
committer | Robin Stocker <robin@nibor.org> | 2013-04-19 19:55:24 +0200 |
commit | a50ed5666ff41b2b08d09adffad5368b33871e45 (patch) | |
tree | 9ddb394abf9de9176f49a7cfc72a3b101140da8c /org.eclipse.jgit | |
parent | ee222a3be1e8b902667a739625047eef29154924 (diff) | |
download | jgit-a50ed5666ff41b2b08d09adffad5368b33871e45.tar.gz jgit-a50ed5666ff41b2b08d09adffad5368b33871e45.zip |
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
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/api/Status.java | 12 |
1 files changed, 11 insertions, 1 deletions
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 <christian.halstrick@sap.com> + * Copyright (C) 2011, 2013 Christian Halstrick <christian.halstrick@sap.com> * 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 @@ -153,6 +155,14 @@ public class Status { } /** + * @return a map from conflicting path to its {@link StageState}. + * @since 3.0 + */ + public Map<String, StageState> getConflictingStageState() { + return Collections.unmodifiableMap(diff.getConflictingStageStates()); + } + + /** * @return set of files and folders that are ignored and not in the index. */ public Set<String> getIgnoredNotInIndex() { |