diff --git a/src/Commands/Rebase.cs b/src/Commands/Rebase.cs
index 2ec50f3c0..dd3db0de9 100644
--- a/src/Commands/Rebase.cs
+++ b/src/Commands/Rebase.cs
@@ -15,12 +15,15 @@ public Rebase(string repo, string basedOn, bool autoStash)
public class InteractiveRebase : Command
{
- public InteractiveRebase(string repo, string basedOn)
+ public InteractiveRebase(string repo, string basedOn, bool autoStash)
{
WorkingDirectory = repo;
Context = repo;
Editor = EditorType.RebaseEditor;
- Args = $"rebase -i --autosquash {basedOn}";
+ Args = "rebase -i --autosquash ";
+ if (autoStash)
+ Args += "--autostash ";
+ Args += basedOn;
}
}
}
diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml
index f8c27ed81..3b9042daa 100644
--- a/src/Resources/Locales/de_DE.axaml
+++ b/src/Resources/Locales/de_DE.axaml
@@ -441,6 +441,7 @@
Revert wird durchgeführt.
Reverte Commit
Interaktiver Rebase
+ Lokale Änderungen stashen & wieder anwenden
Auf:
Ziel Branch:
Link kopieren
diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml
index 36b1c4ce5..412aa4d69 100644
--- a/src/Resources/Locales/en_US.axaml
+++ b/src/Resources/Locales/en_US.axaml
@@ -452,6 +452,7 @@
Revert in progress.
Reverting commit
Interactive Rebase
+ Stash & reapply local changes
On:
Drag-drop to reorder commits
Target Branch:
diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml
index e85b1658d..f145f8add 100644
--- a/src/Resources/Locales/es_ES.axaml
+++ b/src/Resources/Locales/es_ES.axaml
@@ -438,6 +438,7 @@
Revert en progreso.
Haciendo revert del commit
Rebase Interactivo
+ Stash & reaplicar cambios locales
En:
Rama Objetivo:
Copiar Enlace
diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml
index 4ff5e5c6d..ce2fd424f 100644
--- a/src/Resources/Locales/fr_FR.axaml
+++ b/src/Resources/Locales/fr_FR.axaml
@@ -386,6 +386,7 @@
Annulation en cours.
Annulation du commit
Rebase interactif
+ Stash & réappliquer changements locaux
Sur :
Branche cible :
Copier le lien
diff --git a/src/Resources/Locales/it_IT.axaml b/src/Resources/Locales/it_IT.axaml
index b198485b8..f6c375db7 100644
--- a/src/Resources/Locales/it_IT.axaml
+++ b/src/Resources/Locales/it_IT.axaml
@@ -406,6 +406,7 @@
Ripristino in corso.
Ripristinando il commit
Riallinea Interattivamente
+ Stasha e Riapplica modifiche locali
Su:
Branch di destinazione:
Copia il Link
diff --git a/src/Resources/Locales/ja_JP.axaml b/src/Resources/Locales/ja_JP.axaml
index a70a722a0..eeb7362c9 100644
--- a/src/Resources/Locales/ja_JP.axaml
+++ b/src/Resources/Locales/ja_JP.axaml
@@ -385,6 +385,7 @@
元に戻す処理が進行中です。'中止'を押すと元のHEADが復元されます。
コミットを元に戻しています
インタラクティブ リベース
+ ローカルの変更をスタッシュして再適用
On:
対象のブランチ:
リンクをコピー
diff --git a/src/Resources/Locales/pt_BR.axaml b/src/Resources/Locales/pt_BR.axaml
index a1e6785be..d60820f36 100644
--- a/src/Resources/Locales/pt_BR.axaml
+++ b/src/Resources/Locales/pt_BR.axaml
@@ -353,6 +353,7 @@
Rebase em andamento.
Revert em andamento.
Rebase Interativo
+ Guardar & reaplicar alterações locais
Em:
Ramo Alvo:
Copiar link
diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml
index d2c58949a..a3903380b 100644
--- a/src/Resources/Locales/ru_RU.axaml
+++ b/src/Resources/Locales/ru_RU.axaml
@@ -445,6 +445,7 @@
Выполняется отмена ревизии.
Выполняется отмена
Интерактивное перемещение
+ Отложить и применить повторно локальные изменения
На:
Перетаскивайте для переупорядочивания ревизий
Целевая ветка:
diff --git a/src/Resources/Locales/ta_IN.axaml b/src/Resources/Locales/ta_IN.axaml
index 5f6c1b0e3..0646b7167 100644
--- a/src/Resources/Locales/ta_IN.axaml
+++ b/src/Resources/Locales/ta_IN.axaml
@@ -385,6 +385,7 @@
திரும்ப்பெறும் செயல்பாட்டில் உள்ளது.
திரும்பபெறும் உறுதிமொழி
ஊடாடும் மறுதளம்
+ உள்ளக மாற்றங்களை பதுக்கிவை & மீண்டும் இடு
மேல்:
இலக்கு கிளை:
இணைப்பை நகலெடு
diff --git a/src/Resources/Locales/uk_UA.axaml b/src/Resources/Locales/uk_UA.axaml
index 9a1ef3180..ca820926b 100644
--- a/src/Resources/Locales/uk_UA.axaml
+++ b/src/Resources/Locales/uk_UA.axaml
@@ -390,6 +390,7 @@
Скасування в процесі.
Скасування коміту
Інтерактивне перебазування
+ Сховати та застосувати локальні зміни
На:
Цільова гілка:
Копіювати посилання
diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml
index a9a1c455f..454fbe6c5 100644
--- a/src/Resources/Locales/zh_CN.axaml
+++ b/src/Resources/Locales/zh_CN.axaml
@@ -456,6 +456,7 @@
回滚提交操作进行中。
正在回滚提交
交互式变基
+ 自动贮藏并恢复本地变更
起始提交 :
拖拽以便对提交重新排序
目标分支 :
diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml
index c466b9504..5fe88e5cf 100644
--- a/src/Resources/Locales/zh_TW.axaml
+++ b/src/Resources/Locales/zh_TW.axaml
@@ -456,6 +456,7 @@
復原提交操作進行中。
正在復原提交
互動式重定基底
+ 自動擱置變更並復原本機變更
起始提交:
拖曳以重新排序提交
目標分支:
diff --git a/src/ViewModels/Histories.cs b/src/ViewModels/Histories.cs
index f0bf8bef5..7d5932df7 100644
--- a/src/ViewModels/Histories.cs
+++ b/src/ViewModels/Histories.cs
@@ -640,12 +640,6 @@ public ContextMenu CreateContextMenuForSelectedCommits(List selec
interactiveRebase.Icon = App.CreateMenuIcon("Icons.InteractiveRebase");
interactiveRebase.Click += async (_, e) =>
{
- if (_repo.LocalChangesCount > 0)
- {
- App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
- return;
- }
-
await App.ShowDialog(new InteractiveRebase(_repo, current, commit));
e.Handled = true;
};
diff --git a/src/ViewModels/InteractiveRebase.cs b/src/ViewModels/InteractiveRebase.cs
index 4e5b5c889..78d806008 100644
--- a/src/ViewModels/InteractiveRebase.cs
+++ b/src/ViewModels/InteractiveRebase.cs
@@ -84,6 +84,12 @@ public Models.Commit On
private set;
}
+ public bool AutoStash
+ {
+ get;
+ set;
+ } = true;
+
public AvaloniaList IssueTrackerRules
{
get => _repo.Settings.IssueTrackerRules;
@@ -212,7 +218,7 @@ public async Task Start()
}
var log = _repo.CreateLog("Interactive Rebase");
- var succ = await new Commands.InteractiveRebase(_repo.FullPath, On.SHA)
+ var succ = await new Commands.InteractiveRebase(_repo.FullPath, On.SHA, AutoStash)
.Use(log)
.ExecAsync();
diff --git a/src/Views/InteractiveRebase.axaml b/src/Views/InteractiveRebase.axaml
index 968e0ec04..c8166516c 100644
--- a/src/Views/InteractiveRebase.axaml
+++ b/src/Views/InteractiveRebase.axaml
@@ -38,7 +38,7 @@
-
+
@@ -47,6 +47,8 @@
+
+