Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Commands/Push.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@ namespace SourceGit.Commands
{
public class Push : Command
{
public Push(string repo, string local, string remote, string remoteBranch, bool withTags, bool checkSubmodules, bool track, bool force)
public Push(string repo, string local, string remote, string remoteBranch, bool withTags, bool checkSubmodules, bool track, bool force, bool noVerify)
{
_remote = remote;

Expand All@@ -22,6 +22,8 @@ public Push(string repo, string local, string remote, string remoteBranch, bool
builder.Append("-u ");
if (force)
builder.Append("--force-with-lease ");
if (noVerify)
builder.Append("--no-verify ");

builder.Append(remote).Append(' ').Append(local).Append(':').Append(remoteBranch);
Args = builder.ToString();
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/de_DE.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -741,6 +741,7 @@ $1, $2, … Werte der Eingabe-Steuerelemente</x:String>
<x:String x:Key="Text.Push.Force" xml:space="preserve">Erzwinge Push</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">Lokaler Branch:</x:String>
<x:String x:Key="Text.Push.New" xml:space="preserve">NEU</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">pre-push Hook überspringen</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">Remote:</x:String>
<x:String x:Key="Text.Push.Revision" xml:space="preserve">Revision:</x:String>
<x:String x:Key="Text.Push.Revision.Title" xml:space="preserve">Revision zu Remote-Branch pushen</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/el_GR.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -740,6 +740,7 @@
<x:String x:Key="Text.Push.Force" xml:space="preserve">Εξαναγκασμένο push</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">Τοπικός κλάδος:</x:String>
<x:String x:Key="Text.Push.New" xml:space="preserve">ΝΕΟ</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">Παράκαμψη του pre-push hook</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">Απομακρυσμένο:</x:String>
<x:String x:Key="Text.Push.Revision" xml:space="preserve">Αναθεώρηση:</x:String>
<x:String x:Key="Text.Push.Revision.Title" xml:space="preserve">Push αναθεώρησης σε απομακρυσμένο</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/en_US.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -742,6 +742,7 @@
<x:String x:Key="Text.Push.Force" xml:space="preserve">Force push</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">Local Branch:</x:String>
<x:String x:Key="Text.Push.New" xml:space="preserve">NEW</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">Bypass the pre-push hook</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">Remote:</x:String>
<x:String x:Key="Text.Push.Revision" xml:space="preserve">Revision:</x:String>
<x:String x:Key="Text.Push.Revision.Title" xml:space="preserve">Push Revision To Remote</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/es_ES.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -746,6 +746,7 @@
<x:String x:Key="Text.Push.Force" xml:space="preserve">Forzar push</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">Rama Local:</x:String>
<x:String x:Key="Text.Push.New" xml:space="preserve">NUEVO</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">Saltar el hook de pre-push</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">Remoto:</x:String>
<x:String x:Key="Text.Push.Revision" xml:space="preserve">Revisión:</x:String>
<x:String x:Key="Text.Push.Revision.Title" xml:space="preserve">Push Revisión al Remoto</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/fr_FR.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -708,6 +708,7 @@
<x:String x:Key="Text.Push.Force" xml:space="preserve">Poussage forcé</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">Branche locale :</x:String>
<x:String x:Key="Text.Push.New" xml:space="preserve">NOUVEAU</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">Contourner le hook de pre-push</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">Dépôt distant :</x:String>
<x:String x:Key="Text.Push.Revision" xml:space="preserve">Révision :</x:String>
<x:String x:Key="Text.Push.Revision.Title" xml:space="preserve">Pousser la Révision vers le Dépôt Distant</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/he_IL.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -708,6 +708,7 @@
<x:String x:Key="Text.Push.Force" xml:space="preserve">Force push</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">Branch מקומי:</x:String>
<x:String x:Key="Text.Push.New" xml:space="preserve">חדש</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">דלג על pre-push hook</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">Remote:</x:String>
<x:String x:Key="Text.Push.Revision" xml:space="preserve">Revision:</x:String>
<x:String x:Key="Text.Push.Revision.Title" xml:space="preserve">Push של Revision ל־Remote</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/id_ID.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -741,6 +741,7 @@
<x:String x:Key="Text.Push.Force" xml:space="preserve">Paksa push</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">Branch Lokal:</x:String>
<x:String x:Key="Text.Push.New" xml:space="preserve">BARU</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">Lewati hook pre-push</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">Remote:</x:String>
<x:String x:Key="Text.Push.Revision" xml:space="preserve">Revisi:</x:String>
<x:String x:Key="Text.Push.Revision.Title" xml:space="preserve">Push Revisi ke Remote</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/it_IT.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -653,6 +653,7 @@ ${pure_files:N} Come ${files:N}, ma senza cartelle</x:String>
<x:String x:Key="Text.Push.Force" xml:space="preserve">Forza l'invio</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">Branch Locale:</x:String>
<x:String x:Key="Text.Push.New" xml:space="preserve">NUOVO</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">Ignora l'hook di pre-push</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">Remoto:</x:String>
<x:String x:Key="Text.Push.Revision" xml:space="preserve">Revisione:</x:String>
<x:String x:Key="Text.Push.Revision.Title" xml:space="preserve">Invia Revisione Al Remoto</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/ja_JP.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -740,6 +740,7 @@
<x:String x:Key="Text.Push.Force" xml:space="preserve">強制的にプッシュ</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">ローカルブランチ:</x:String>
<x:String x:Key="Text.Push.New" xml:space="preserve">新規</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">プッシュ前のフックを実行しない</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">リモート:</x:String>
<x:String x:Key="Text.Push.Revision" xml:space="preserve">リビジョン:</x:String>
<x:String x:Key="Text.Push.Revision.Title" xml:space="preserve">リビジョンをリモートにプッシュ</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/ko_KR.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -712,6 +712,7 @@
<x:String x:Key="Text.Push.Force" xml:space="preserve">강제 푸시</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">로컬 브랜치:</x:String>
<x:String x:Key="Text.Push.New" xml:space="preserve">신규</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">pre-push 훅 건너뛰기</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">원격:</x:String>
<x:String x:Key="Text.Push.Revision" xml:space="preserve">리비전:</x:String>
<x:String x:Key="Text.Push.Revision.Title" xml:space="preserve">리비전을 원격에 푸시</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/pt_BR.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -464,6 +464,7 @@
<x:String x:Key="Text.Push.CheckSubmodules" xml:space="preserve">Certifica de que submodules foram enviadas</x:String>
<x:String x:Key="Text.Push.Force" xml:space="preserve">Forçar push</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">Branch Local:</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">Ignorar o hook de pre-push</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">Remoto:</x:String>
<x:String x:Key="Text.Push.Title" xml:space="preserve">Empurrar Alterações para o Remoto</x:String>
<x:String x:Key="Text.Push.To" xml:space="preserve">Branch Remoto:</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/ru_RU.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -746,6 +746,7 @@
<x:String x:Key="Text.Push.Force" xml:space="preserve">Принудительно выложить</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">Локальная ветка:</x:String>
<x:String x:Key="Text.Push.New" xml:space="preserve">НОВЫЙ</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">Обходной зацеп предварительного выкладывания</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">Внешний репозиторий:</x:String>
<x:String x:Key="Text.Push.Revision" xml:space="preserve">Ревизия:</x:String>
<x:String x:Key="Text.Push.Revision.Title" xml:space="preserve">Выложить ревизию на удалёную</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/ta_IN.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -463,6 +463,7 @@
<x:String x:Key="Text.Push.CheckSubmodules" xml:space="preserve">துணைத் தொகுதிகள் தள்ளப்பட்டது என்பதை உறுதிசெய்</x:String>
<x:String x:Key="Text.Push.Force" xml:space="preserve">கட்டாயமாக தள்ளு</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">உள்ளக கிளை:</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">pre-push hook-ஐத் தவிர்</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">தொலை:</x:String>
<x:String x:Key="Text.Push.Title" xml:space="preserve">மாற்றங்களை தொலைக்கு தள்ளு</x:String>
<x:String x:Key="Text.Push.To" xml:space="preserve">தொலை கிளை:</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/uk_UA.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -467,6 +467,7 @@
<x:String x:Key="Text.Push.CheckSubmodules" xml:space="preserve">Переконатися, що підмодулі надіслано</x:String>
<x:String x:Key="Text.Push.Force" xml:space="preserve">Примусовий push</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">Локальна гілка:</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">Обхід pre-push hook</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">Віддалене сховище:</x:String>
<x:String x:Key="Text.Push.Title" xml:space="preserve">Надіслати зміни на віддалене сховище</x:String>
<x:String x:Key="Text.Push.To" xml:space="preserve">Віддалена гілка:</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/zh_CN.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -746,6 +746,7 @@
<x:String x:Key="Text.Push.Force" xml:space="preserve">启用强制推送</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">本地分支 :</x:String>
<x:String x:Key="Text.Push.New" xml:space="preserve">新建</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">绕过 pre-push 钩子</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">远程仓库 :</x:String>
<x:String x:Key="Text.Push.Revision" xml:space="preserve">修订 :</x:String>
<x:String x:Key="Text.Push.Revision.Title" xml:space="preserve">推送指定修订到远程仓库</x:String>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/Locales/zh_TW.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -746,6 +746,7 @@
<x:String x:Key="Text.Push.Force" xml:space="preserve">啟用強制推送</x:String>
<x:String x:Key="Text.Push.Local" xml:space="preserve">本機分支:</x:String>
<x:String x:Key="Text.Push.New" xml:space="preserve">新增</x:String>
<x:String x:Key="Text.Push.NoVerify" xml:space="preserve">繞過 pre-push hook</x:String>
<x:String x:Key="Text.Push.Remote" xml:space="preserve">遠端存放庫:</x:String>
<x:String x:Key="Text.Push.Revision" xml:space="preserve">修訂:</x:String>
<x:String x:Key="Text.Push.Revision.Title" xml:space="preserve">推送修訂到遠端存放庫</x:String>
Expand Down
9 changes: 8 additions & 1 deletion src/ViewModels/Push.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -97,6 +97,12 @@ public bool ForcePush
set;
}

public bool NoVerify
{
get;
set;
}

public Push(Repository repo, Models.Branch localBranch)
{
_repo = repo;
Expand DownExpand Up@@ -204,7 +210,8 @@ public override async Task<bool> Sure()
PushAllTags,
_repo.Submodules.Count > 0 && CheckSubmodules,
_isSetTrackOptionVisible && _tracking,
ForcePush).Use(log).RunAsync();
ForcePush,
NoVerify).Use(log).RunAsync();

log.Complete();
return succ;
Expand Down
3 changes: 2 additions & 1 deletion src/ViewModels/PushRevision.cs
Original file line numberDiff line numberDiff line change
Expand Up@@ -45,7 +45,8 @@ public override async Task<bool> Sure()
false,
false,
false,
Force).Use(log).RunAsync();
Force,
false).Use(log).RunAsync();

log.Complete();
return succ;
Expand Down
7 changes: 6 additions & 1 deletion src/Views/Push.axaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@
Text="{DynamicResource Text.Push.Title}"/>
</StackPanel>

<Grid Margin="0,16,0,0" RowDefinitions="32,32,32,Auto,Auto,32,32" ColumnDefinitions="130,*">
<Grid Margin="0,16,0,0" RowDefinitions="32,32,32,Auto,Auto,32,32,32" ColumnDefinitions="130,*">
<TextBlock Grid.Row="0" Grid.Column="0"
HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,8,0"
Expand DownExpand Up@@ -94,6 +94,11 @@
Content="{DynamicResource Text.Push.Force}"
IsChecked="{Binding ForcePush, Mode=TwoWay}"
ToolTip.Tip="--force-with-lease"/>

<CheckBox Grid.Row="7" Grid.Column="1"
Content="{DynamicResource Text.Push.NoVerify}"
IsChecked="{Binding NoVerify, Mode=TwoWay}"
ToolTip.Tip="--no-verify"/>
</Grid>
</StackPanel>
</UserControl>