@@ -771,7 +771,8 @@ public ContextMenu CreateContextMenuForUnstagedChanges(string selectedSingleFold
771771 ignoreFolder . Header = App . Text ( "WorkingCopy.AddToGitIgnore.InFolder" ) ;
772772 ignoreFolder . Click += ( _ , e ) =>
773773 {
774- Commands . GitIgnore . Add ( _repo . FullPath , $ "{ selectedSingleFolder } /") ;
774+ if ( _repo . CanCreatePopup ( ) )
775+ _repo . ShowPopup ( new AddToIgnore ( _repo , $ "{ selectedSingleFolder } /") ) ;
775776 e . Handled = true ;
776777 } ;
777778 addToIgnore . Items . Add ( ignoreFolder ) ;
@@ -783,7 +784,8 @@ public ContextMenu CreateContextMenuForUnstagedChanges(string selectedSingleFold
783784 singleFile . Header = App . Text ( "WorkingCopy.AddToGitIgnore.SingleFile" ) ;
784785 singleFile . Click += ( _ , e ) =>
785786 {
786- Commands . GitIgnore . Add ( _repo . FullPath , change . Path ) ;
787+ if ( _repo . CanCreatePopup ( ) )
788+ _repo . ShowPopup ( new AddToIgnore ( _repo , change . Path ) ) ;
787789 e . Handled = true ;
788790 } ;
789791 addToIgnore . Items . Add ( singleFile ) ;
@@ -794,7 +796,8 @@ public ContextMenu CreateContextMenuForUnstagedChanges(string selectedSingleFold
794796 byExtension . Header = App . Text ( "WorkingCopy.AddToGitIgnore.Extension" , extension ) ;
795797 byExtension . Click += ( _ , e ) =>
796798 {
797- Commands . GitIgnore . Add ( _repo . FullPath , $ "*{ extension } ") ;
799+ if ( _repo . CanCreatePopup ( ) )
800+ _repo . ShowPopup ( new AddToIgnore ( _repo , $ "*{ extension } ") ) ;
798801 e . Handled = true ;
799802 } ;
800803 addToIgnore . Items . Add ( byExtension ) ;
@@ -805,7 +808,8 @@ public ContextMenu CreateContextMenuForUnstagedChanges(string selectedSingleFold
805808 byExtensionInSameFolder . Click += ( _ , e ) =>
806809 {
807810 var dir = Path . GetDirectoryName ( change . Path ) ! . Replace ( '\\ ' , '/' ) . TrimEnd ( '/' ) ;
808- Commands . GitIgnore . Add ( _repo . FullPath , $ "{ dir } /*{ extension } ") ;
811+ if ( _repo . CanCreatePopup ( ) )
812+ _repo . ShowPopup ( new AddToIgnore ( _repo , $ "{ dir } /*{ extension } ") ) ;
809813 e . Handled = true ;
810814 } ;
811815 addToIgnore . Items . Add ( byExtensionInSameFolder ) ;
@@ -827,7 +831,8 @@ public ContextMenu CreateContextMenuForUnstagedChanges(string selectedSingleFold
827831 ignoreFolder . Header = App . Text ( "WorkingCopy.AddToGitIgnore.InFolder" ) ;
828832 ignoreFolder . Click += ( _ , e ) =>
829833 {
830- Commands . GitIgnore . Add ( _repo . FullPath , $ "{ selectedSingleFolder } /") ;
834+ if ( _repo . CanCreatePopup ( ) )
835+ _repo . ShowPopup ( new AddToIgnore ( _repo , $ "{ selectedSingleFolder } /") ) ;
831836 e . Handled = true ;
832837 } ;
833838 addToIgnore . Items . Add ( ignoreFolder ) ;
@@ -1133,7 +1138,8 @@ public ContextMenu CreateContextMenuForUnstagedChanges(string selectedSingleFold
11331138 ignoreFolder . Header = App . Text ( "WorkingCopy.AddToGitIgnore.InFolder" ) ;
11341139 ignoreFolder . Click += ( _ , e ) =>
11351140 {
1136- Commands . GitIgnore . Add ( _repo . FullPath , $ "{ selectedSingleFolder } /") ;
1141+ if ( _repo . CanCreatePopup ( ) )
1142+ _repo . ShowPopup ( new AddToIgnore ( _repo , $ "{ selectedSingleFolder } /") ) ;
11371143 e . Handled = true ;
11381144 } ;
11391145
0 commit comments