[anjuta/git-shell: 55/61] git: Detect different conflict status codes introduced in Git 1.7



commit 4d1f8f90332b2c35488963391338cbcdfbf7ff53
Author: James Liggett <jrliggett cox net>
Date:   Thu Jul 15 00:09:24 2010 -0700

    git: Detect different conflict status codes introduced in Git 1.7
    
    I don't know if I've got them all, but hopefully I got the most common ones.

 plugins/git/git-status-command.c |    2 +-
 plugins/git/git-status.c         |   14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/plugins/git/git-status-command.c b/plugins/git/git-status-command.c
index f0188d9..c5d1454 100644
--- a/plugins/git/git-status-command.c
+++ b/plugins/git/git-status-command.c
@@ -24,7 +24,7 @@
 
 #include "git-status-command.h"
 
-#define STATUS_REGEX "(modified|new file|deleted|unmerged):   (.*)"
+#define STATUS_REGEX "(modified|new file|deleted|unmerged|both modified|both added|both deleted):   (.*)"
 #define UNTRACKED_FILES_REGEX "(?:#\\t)(.*)"
 #define SECTION_COMMIT_REGEX "Changes to be committed:"
 #define SECTION_NOT_UPDATED_REGEX "Changed but not updated:"
diff --git a/plugins/git/git-status.c b/plugins/git/git-status.c
index 54e022a..c6766cb 100644
--- a/plugins/git/git-status.c
+++ b/plugins/git/git-status.c
@@ -53,9 +53,23 @@ git_status_init (GitStatus *self)
 						 "deleted", 
 						 GINT_TO_POINTER (ANJUTA_VCS_STATUS_DELETED));
 	
+	/* Git 1.7 added a bunch of different conflicted states */
+
 	g_hash_table_insert (self->priv->status_lookup_table,
 						 "unmerged", 
 						 GINT_TO_POINTER (ANJUTA_VCS_STATUS_CONFLICTED));
+
+	g_hash_table_insert (self->priv->status_lookup_table,
+						 "both modified", 
+						 GINT_TO_POINTER (ANJUTA_VCS_STATUS_CONFLICTED));
+
+	g_hash_table_insert (self->priv->status_lookup_table,
+						 "both added", 
+						 GINT_TO_POINTER (ANJUTA_VCS_STATUS_CONFLICTED));
+
+	g_hash_table_insert (self->priv->status_lookup_table,
+						 "both deleted", 
+						 GINT_TO_POINTER (ANJUTA_VCS_STATUS_CONFLICTED));
 	
 	g_hash_table_insert (self->priv->status_lookup_table,
 						 "untracked", 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]