File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 987987 <x : String x : Key =" Text.WorkingCopy.AddToGitIgnore.ExtensionInSameFolder" xml : space =" preserve" >Ignore *{0} files in the same folder</x : String >
988988 <x : String x : Key =" Text.WorkingCopy.AddToGitIgnore.InFolder" xml : space =" preserve" >Ignore untracked files in this folder</x : String >
989989 <x : String x : Key =" Text.WorkingCopy.AddToGitIgnore.SingleFile" xml : space =" preserve" >Ignore this file only</x : String >
990+ <x : String x : Key =" Text.WorkingCopy.AddToGitIgnore.UntrackedInSameFolder" xml : space =" preserve" >Ignore all untracked files in the same folder</x : String >
990991 <x : String x : Key =" Text.WorkingCopy.Amend" xml : space =" preserve" >Amend</x : String >
991992 <x : String x : Key =" Text.WorkingCopy.CanStageTip" xml : space =" preserve" >You can stage this file now.</x : String >
992993 <x : String x : Key =" Text.WorkingCopy.ClearCommitHistories" xml : space =" preserve" >Clear History</x : String >
Original file line number Diff line number Diff line change 990990 <x : String x : Key =" Text.WorkingCopy.AddToGitIgnore.ExtensionInSameFolder" xml : space =" preserve" >忽略同目录下所有 *{0} 文件</x : String >
991991 <x : String x : Key =" Text.WorkingCopy.AddToGitIgnore.InFolder" xml : space =" preserve" >忽略该目录下的新文件</x : String >
992992 <x : String x : Key =" Text.WorkingCopy.AddToGitIgnore.SingleFile" xml : space =" preserve" >忽略本文件</x : String >
993+ <x : String x : Key =" Text.WorkingCopy.AddToGitIgnore.UntrackedInSameFolder" xml : space =" preserve" >忽略同目录下所有新文件</x : String >
993994 <x : String x : Key =" Text.WorkingCopy.Amend" xml : space =" preserve" >修补</x : String >
994995 <x : String x : Key =" Text.WorkingCopy.CanStageTip" xml : space =" preserve" >现在您已可将其加入暂存区中</x : String >
995996 <x : String x : Key =" Text.WorkingCopy.ClearCommitHistories" xml : space =" preserve" >清空历史提交信息</x : String >
Original file line number Diff line number Diff line change 990990 <x : String x : Key =" Text.WorkingCopy.AddToGitIgnore.ExtensionInSameFolder" xml : space =" preserve" >忽略同路徑下所有 *{0} 檔案</x : String >
991991 <x : String x : Key =" Text.WorkingCopy.AddToGitIgnore.InFolder" xml : space =" preserve" >忽略本路徑下的新增檔案</x : String >
992992 <x : String x : Key =" Text.WorkingCopy.AddToGitIgnore.SingleFile" xml : space =" preserve" >忽略本檔案</x : String >
993+ <x : String x : Key =" Text.WorkingCopy.AddToGitIgnore.UntrackedInSameFolder" xml : space =" preserve" >忽略同路徑下所有新增檔案</x : String >
993994 <x : String x : Key =" Text.WorkingCopy.Amend" xml : space =" preserve" >修補</x : String >
994995 <x : String x : Key =" Text.WorkingCopy.CanStageTip" xml : space =" preserve" >現在您已可將其加入暫存區中</x : String >
995996 <x : String x : Key =" Text.WorkingCopy.ClearCommitHistories" xml : space =" preserve" >清除提交訊息歷史</x : String >
Original file line number Diff line number Diff line change @@ -516,6 +516,20 @@ private ContextMenu CreateContextMenuForUnstagedChanges(ViewModels.WorkingCopy v
516516 } ;
517517 addToIgnore . Items . Add ( byExtensionInSameFolder ) ;
518518 }
519+
520+ if ( ! isRooted )
521+ {
522+ var untrackedInSameFolder = new MenuItem ( ) ;
523+ untrackedInSameFolder . Header = App . Text ( "WorkingCopy.AddToGitIgnore.UntrackedInSameFolder" ) ;
524+ untrackedInSameFolder . Click += ( _ , e ) =>
525+ {
526+ var dir = Path . GetDirectoryName ( change . Path ) ! . Replace ( '\\ ' , '/' ) . TrimEnd ( '/' ) ;
527+ if ( repo . CanCreatePopup ( ) )
528+ repo . ShowPopup ( new ViewModels . AddToIgnore ( repo , $ "{ dir } /") ) ;
529+ e . Handled = true ;
530+ } ;
531+ addToIgnore . Items . Add ( untrackedInSameFolder ) ;
532+ }
519533 }
520534
521535 menu . Items . Add ( addToIgnore ) ;
You can’t perform that action at this time.
0 commit comments