Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2016-11-06 22:07:47 +0000
committerMatthias Sohn2016-12-12 21:57:09 +0000
commit63485929cf9affdf82df44addd31212f4854c6cb (patch)
treeec7d52eb87ba56ac114253a9a5b55519afa1dcb7 /org.eclipse.egit.ui/src/org/eclipse
parent5f95132e5c3a0422f53c8f886757a8f23ee7a8e6 (diff)
downloadegit-63485929cf9affdf82df44addd31212f4854c6cb.tar.gz
egit-63485929cf9affdf82df44addd31212f4854c6cb.tar.xz
egit-63485929cf9affdf82df44addd31212f4854c6cb.zip
Make auto-staging of files being moved configurable
- by default auto-stage files being moved. This simplifies reverting a move using hard reset. If moved files aren't auto-staged hard reset does not fully revert the move since the new unstaged file isn't tracked by git - add an option to disable auto-staging of files being moved Change-Id: I1de114e90c26988bc83d4f4ef859cde1909f9ef4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java3
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/CommittingPreferencePage.java11
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties1
3 files changed, 15 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
index 28a0380760..6b3d59d757 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
@@ -3250,6 +3250,9 @@ public class UIText extends NLS {
public static String CommittingPreferencePage_autoStageDeletion;
/** */
+ public static String CommittingPreferencePage_autoStageMoves;
+
+ /** */
public static String CommittingPreferencePage_AutoStageOnCommit;
/** */
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/CommittingPreferencePage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/CommittingPreferencePage.java
index 1482458763..2269a259cc 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/CommittingPreferencePage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/CommittingPreferencePage.java
@@ -134,6 +134,17 @@ public class CommittingPreferencePage extends FieldEditorPreferencePage
};
addField(autoStageDeletion);
+ BooleanFieldEditor autoStageMoves = new BooleanFieldEditor(
+ GitCorePreferences.core_autoStageMoves,
+ UIText.CommittingPreferencePage_autoStageMoves, generalGroup) {
+
+ @Override
+ public IPreferenceStore getPreferenceStore() {
+ return corePreferences;
+ }
+ };
+ addField(autoStageMoves);
+
IntegerFieldEditor historySize = new IntegerFieldEditor(
UIPreferences.COMMIT_DIALOG_HISTORY_SIZE,
UIText.CommittingPreferencePage_commitMessageHistory,
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
index 2830767c54..014a6f4b20 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
@@ -1045,6 +1045,7 @@ CommittingPreferencePage_BlockCommit=Block commit button
CommittingPreferencePage_BlockCommitCombo=Block if there are:
CommittingPreferencePage_AlwaysUseStagingView=Use Staging View to commit instead of Commit Dialog
CommittingPreferencePage_autoStageDeletion=Automatically stage files being deleted
+CommittingPreferencePage_autoStageMoves=Automatically stage files being moved
CommittingPreferencePage_AutoStageOnCommit=Automatically stage selected resources on commit
CommittingPreferencePage_general=General

Back to the top