File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
release/share/git-webui/webui/js
src/share/git-webui/webui/js Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -519,6 +519,7 @@ ClassMethod Sync(Msg As %String, Output alert As %String) As %Status
519519 write " No remote repository configured: skipping fetch, pull and push"
520520 do ..SyncCommit (Msg )
521521 } elseif ..InDefaultBranchBasicMode () {
522+ // Do not commit to default merge branch in basic mode
522523 write " In Basic mode on default merge branch: skipping commit and push"
523524 do ..Fetch ()
524525 do ..Pull ()
Original file line number Diff line number Diff line change @@ -2588,6 +2588,7 @@ webui.NewChangedFilesView = function(workspaceView) {
25882588 } ) ;
25892589 $ ( "#commitBtn" ) . off ( "click" ) ;
25902590 $ ( "#commitBtn" ) . on ( "click" , function ( ) {
2591+ // Make sure we are not commiting to default merge branch in basic mode
25912592 $ . get ( "api/basic-and-default" , function ( data ) {
25922593 var basicAndDefault = JSON . parse ( data ) [ "basic-and-default" ]
25932594 if ( basicAndDefault == "1" ) {
@@ -2745,6 +2746,7 @@ webui.NewChangedFilesView = function(workspaceView) {
27452746 } ) ;
27462747 }
27472748
2749+ // Popup for when trying to commit to default merge branch in basic mode
27482750 self . noCommitsOnDefault = function ( ) {
27492751 function removePopup ( popup ) {
27502752 $ ( popup ) . children ( ".modal-fade" ) . modal ( "hide" ) ;
@@ -2766,7 +2768,7 @@ webui.NewChangedFilesView = function(workspaceView) {
27662768 webui . warningIcon +
27672769 '</div>' +
27682770 '<div class="col-sm-11">' +
2769- '<p>You cannot commit to the default merge branch while using basic mode. Please switch to another branch.</p>' +
2771+ '<p>You cannot commit directly to the default merge branch while using basic mode. Please switch to another branch.</p>' +
27702772 '</div>' +
27712773 '</div>' +
27722774 '</div>' +
Original file line number Diff line number Diff line change @@ -2588,6 +2588,7 @@ webui.NewChangedFilesView = function(workspaceView) {
25882588 } ) ;
25892589 $ ( "#commitBtn" ) . off ( "click" ) ;
25902590 $ ( "#commitBtn" ) . on ( "click" , function ( ) {
2591+ // Make sure we are not commiting to default merge branch in basic mode
25912592 $ . get ( "api/basic-and-default" , function ( data ) {
25922593 var basicAndDefault = JSON . parse ( data ) [ "basic-and-default" ]
25932594 if ( basicAndDefault == "1" ) {
@@ -2745,6 +2746,7 @@ webui.NewChangedFilesView = function(workspaceView) {
27452746 } ) ;
27462747 }
27472748
2749+ // Popup for when trying to commit to default merge branch in basic mode
27482750 self . noCommitsOnDefault = function ( ) {
27492751 function removePopup ( popup ) {
27502752 $ ( popup ) . children ( ".modal-fade" ) . modal ( "hide" ) ;
@@ -2766,7 +2768,7 @@ webui.NewChangedFilesView = function(workspaceView) {
27662768 webui . warningIcon +
27672769 '</div>' +
27682770 '<div class="col-sm-11">' +
2769- '<p>You cannot commit to the default merge branch while using basic mode. Please switch to another branch.</p>' +
2771+ '<p>You cannot commit directly to the default merge branch while using basic mode. Please switch to another branch.</p>' +
27702772 '</div>' +
27712773 '</div>' +
27722774 '</div>' +
You can’t perform that action at this time.
0 commit comments