Skip to content

Commit d7d0032

Browse files
committed
Add useful comments
1 parent 1c9c9dc commit d7d0032

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

cls/SourceControl/Git/Utils.cls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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()

git-webui/release/share/git-webui/webui/js/git-webui.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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>' +

git-webui/src/share/git-webui/webui/js/git-webui.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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>' +

0 commit comments

Comments
 (0)