From 9ffac053ff97b3cb0cf6f48e761ff1afb7a5d37a Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Wed, 28 Jan 2015 17:49:32 +0300 Subject: [PATCH] [git] IDEA-118401 Optionally treat status command as write one --- platform/util/resources/misc/registry.properties | 1 + plugins/git4idea/src/git4idea/commands/GitCommand.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index e981f7015e76..10f41a18fe24 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -523,3 +523,4 @@ ide.remove.help.button.from.dialogs.description=Removes help button from dialogs mysql.native.loading.description=Enables native loader for MySQL data sources mysql.native.loading=false +git.status.write=false diff --git a/plugins/git4idea/src/git4idea/commands/GitCommand.java b/plugins/git4idea/src/git4idea/commands/GitCommand.java index 27beb50100c1..32e367f84a35 100644 --- a/plugins/git4idea/src/git4idea/commands/GitCommand.java +++ b/plugins/git4idea/src/git4idea/commands/GitCommand.java @@ -15,6 +15,7 @@ */ package git4idea.commands; +import com.intellij.openapi.util.registry.Registry; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; @@ -62,7 +63,7 @@ public class GitCommand { public static final GitCommand RM = write("rm"); public static final GitCommand SHOW = read("show"); public static final GitCommand STASH = write("stash"); - public static final GitCommand STATUS = read("status"); + public static final GitCommand STATUS = Registry.is("git.status.write") ? write("status") : read("status"); public static final GitCommand TAG = read("tag"); public static final GitCommand UPDATE_INDEX = write("update-index");