File tree Expand file tree Collapse file tree 14 files changed +60
-30
lines changed
Expand file tree Collapse file tree 14 files changed +60
-30
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,12 @@ public bool OnlyStagedWhenStash
161161 set ;
162162 } = false ;
163163
164+ public bool AskBeforeAutoUpdatingSubmodules
165+ {
166+ get ;
167+ set ;
168+ } = false ;
169+
164170 public int ChangesAfterStashing
165171 {
166172 get ;
Original file line number Diff line number Diff line change 108108 <x : String x : Key =" Text.Checkout.LocalChanges.StashAndReapply" xml : space =" preserve" >Stash & Reapply</x : String >
109109 <x : String x : Key =" Text.Checkout.Target" xml : space =" preserve" >Branch:</x : String >
110110 <x : String x : Key =" Text.Checkout.WarnLostCommits" xml : space =" preserve" >Your current HEAD contains commit(s) not connected to any branches/tags! Do you want to continue?</x : String >
111+ <x : String x : Key =" Text.Checkout.WarnUpdatingSubmodules" xml : space =" preserve" >The following submodules need to be updated:{0}Do you want to update them?</x : String >
111112 <x : String x : Key =" Text.Checkout.WithFastForward" xml : space =" preserve" >Checkout & Fast-Forward</x : String >
112113 <x : String x : Key =" Text.Checkout.WithFastForward.Upstream" xml : space =" preserve" >Fast-Forward to:</x : String >
113114 <x : String x : Key =" Text.CherryPick" xml : space =" preserve" >Cherry Pick</x : String >
224225 <x : String x : Key =" Text.Configure.Email" xml : space =" preserve" >Email Address</x : String >
225226 <x : String x : Key =" Text.Configure.Email.Placeholder" xml : space =" preserve" >Email address</x : String >
226227 <x : String x : Key =" Text.Configure.Git" xml : space =" preserve" >GIT</x : String >
228+ <x : String x : Key =" Text.Configure.Git.AskBeforeAutoUpdatingSubmodules" xml : space =" preserve" >Ask before auto-updating submodules</x : String >
227229 <x : String x : Key =" Text.Configure.Git.AutoFetch" xml : space =" preserve" >Fetch remotes automatically</x : String >
228230 <x : String x : Key =" Text.Configure.Git.AutoFetchIntervalSuffix" xml : space =" preserve" >Minute(s)</x : String >
229231 <x : String x : Key =" Text.Configure.Git.ConventionalTypesOverride" xml : space =" preserve" >Conventional Commit Types</x : String >
Original file line number Diff line number Diff line change 112112 <x : String x : Key =" Text.Checkout.LocalChanges.StashAndReapply" xml : space =" preserve" >贮藏并自动恢复</x : String >
113113 <x : String x : Key =" Text.Checkout.Target" xml : space =" preserve" >目标分支 :</x : String >
114114 <x : String x : Key =" Text.Checkout.WarnLostCommits" xml : space =" preserve" >您当前游离的HEAD包含未被任何分支及标签引用的提交!是否继续?</x : String >
115+ <x : String x : Key =" Text.Checkout.WarnUpdatingSubmodules" xml : space =" preserve" >以下子模块需要更新:{0}是否立即更新?</x : String >
115116 <x : String x : Key =" Text.Checkout.WithFastForward" xml : space =" preserve" >检出分支并快进</x : String >
116117 <x : String x : Key =" Text.Checkout.WithFastForward.Upstream" xml : space =" preserve" >上游分支 :</x : String >
117118 <x : String x : Key =" Text.CherryPick" xml : space =" preserve" >挑选提交</x : String >
228229 <x : String x : Key =" Text.Configure.Email" xml : space =" preserve" >电子邮箱</x : String >
229230 <x : String x : Key =" Text.Configure.Email.Placeholder" xml : space =" preserve" >邮箱地址</x : String >
230231 <x : String x : Key =" Text.Configure.Git" xml : space =" preserve" >GIT配置</x : String >
232+ <x : String x : Key =" Text.Configure.Git.AskBeforeAutoUpdatingSubmodules" xml : space =" preserve" >在自动更新子模块前询问用户</x : String >
231233 <x : String x : Key =" Text.Configure.Git.AutoFetch" xml : space =" preserve" >启用定时自动拉取远程更新</x : String >
232234 <x : String x : Key =" Text.Configure.Git.AutoFetchIntervalSuffix" xml : space =" preserve" >分钟</x : String >
233235 <x : String x : Key =" Text.Configure.Git.ConventionalTypesOverride" xml : space =" preserve" >自定义规范化提交类型</x : String >
Original file line number Diff line number Diff line change 112112 <x : String x : Key =" Text.Checkout.LocalChanges.StashAndReapply" xml : space =" preserve" >擱置變更並自動復原</x : String >
113113 <x : String x : Key =" Text.Checkout.Target" xml : space =" preserve" >目標分支:</x : String >
114114 <x : String x : Key =" Text.Checkout.WarnLostCommits" xml : space =" preserve" >您目前的分離的 HEAD 包含與任何分支/標籤無關的提交! 您要繼續嗎?</x : String >
115+ <x : String x : Key =" Text.Checkout.WarnUpdatingSubmodules" xml : space =" preserve" >以下子模組需要更新:{0}您想立即更新它們嗎?</x : String >
115116 <x : String x : Key =" Text.Checkout.WithFastForward" xml : space =" preserve" >簽出分支並快轉</x : String >
116117 <x : String x : Key =" Text.Checkout.WithFastForward.Upstream" xml : space =" preserve" >上游分支: </x : String >
117118 <x : String x : Key =" Text.CherryPick" xml : space =" preserve" >揀選提交</x : String >
228229 <x : String x : Key =" Text.Configure.Email" xml : space =" preserve" >電子郵件</x : String >
229230 <x : String x : Key =" Text.Configure.Email.Placeholder" xml : space =" preserve" >電子郵件地址</x : String >
230231 <x : String x : Key =" Text.Configure.Git" xml : space =" preserve" >Git 設定</x : String >
232+ <x : String x : Key =" Text.Configure.Git.AskBeforeAutoUpdatingSubmodules" xml : space =" preserve" >在自動更新子模組之前詢問用戶</x : String >
231233 <x : String x : Key =" Text.Configure.Git.AutoFetch" xml : space =" preserve" >啟用定時自動提取 (fetch) 遠端更新</x : String >
232234 <x : String x : Key =" Text.Configure.Git.AutoFetchIntervalSuffix" xml : space =" preserve" >分鐘</x : String >
233235 <x : String x : Key =" Text.Configure.Git.ConventionalTypesOverride" xml : space =" preserve" >自訂約定式提交類型</x : String >
Original file line number Diff line number Diff line change @@ -69,11 +69,7 @@ public override async Task<bool> Sure()
6969
7070 if ( succ )
7171 {
72- var submodules = await new Commands . QueryUpdatableSubmodules ( _repo . FullPath , false ) . GetResultAsync ( ) ;
73- if ( submodules . Count > 0 )
74- await new Commands . Submodule ( _repo . FullPath )
75- . Use ( log )
76- . UpdateAsync ( submodules ) ;
72+ await _repo . TryAutoUpdateSubmodules ( log ) ;
7773
7874 if ( needPopStash )
7975 await new Commands . Stash ( _repo . FullPath )
Original file line number Diff line number Diff line change @@ -74,11 +74,7 @@ public override async Task<bool> Sure()
7474
7575 if ( succ )
7676 {
77- var submodules = await new Commands . QueryUpdatableSubmodules ( _repo . FullPath , false ) . GetResultAsync ( ) ;
78- if ( submodules . Count > 0 )
79- await new Commands . Submodule ( _repo . FullPath )
80- . Use ( log )
81- . UpdateAsync ( submodules ) ;
77+ await _repo . TryAutoUpdateSubmodules ( log ) ;
8278
8379 if ( needPopStash )
8480 await new Commands . Stash ( _repo . FullPath )
Original file line number Diff line number Diff line change @@ -69,11 +69,7 @@ public override async Task<bool> Sure()
6969
7070 if ( succ )
7171 {
72- var submodules = await new Commands . QueryUpdatableSubmodules ( _repo . FullPath , false ) . GetResultAsync ( ) ;
73- if ( submodules . Count > 0 )
74- await new Commands . Submodule ( _repo . FullPath )
75- . Use ( log )
76- . UpdateAsync ( submodules ) ;
72+ await _repo . TryAutoUpdateSubmodules ( log ) ;
7773
7874 if ( needPop )
7975 await new Commands . Stash ( _repo . FullPath )
Original file line number Diff line number Diff line change @@ -153,11 +153,7 @@ public override async Task<bool> Sure()
153153
154154 if ( succ )
155155 {
156- var submodules = await new Commands . QueryUpdatableSubmodules ( _repo . FullPath , false ) . GetResultAsync ( ) ;
157- if ( submodules . Count > 0 )
158- await new Commands . Submodule ( _repo . FullPath )
159- . Use ( log )
160- . UpdateAsync ( submodules ) ;
156+ await _repo . TryAutoUpdateSubmodules ( log ) ;
161157
162158 if ( needPopStash )
163159 await new Commands . Stash ( _repo . FullPath )
Original file line number Diff line number Diff line change @@ -91,11 +91,7 @@ public override async Task<bool> Sure()
9191 _repo . SetCommitMessage ( msg ) ;
9292 }
9393
94- var submodules = await new Commands . QueryUpdatableSubmodules ( _repo . FullPath , false ) . GetResultAsync ( ) ;
95- if ( submodules . Count > 0 )
96- await new Commands . Submodule ( _repo . FullPath )
97- . Use ( log )
98- . UpdateAsync ( submodules ) ;
94+ await _repo . TryAutoUpdateSubmodules ( log ) ;
9995 }
10096
10197 log . Complete ( ) ;
Original file line number Diff line number Diff line change @@ -135,9 +135,7 @@ public override async Task<bool> Sure()
135135 UseRebase ) . Use ( log ) . RunAsync ( ) ;
136136 if ( rs )
137137 {
138- var submodules = await new Commands . QueryUpdatableSubmodules ( _repo . FullPath , false ) . GetResultAsync ( ) ;
139- if ( submodules . Count > 0 )
140- await new Commands . Submodule ( _repo . FullPath ) . Use ( log ) . UpdateAsync ( submodules ) ;
138+ await _repo . TryAutoUpdateSubmodules ( log ) ;
141139
142140 if ( needPopStash )
143141 await new Commands . Stash ( _repo . FullPath ) . Use ( log ) . PopAsync ( "stash@{0}" ) ;
You can’t perform that action at this time.
0 commit comments