Skip to content

Commit b34a29d

Browse files
committed
now allows ampersands in the commit message
1 parent 5b1428b commit b34a29d

File tree

6 files changed

+24
-18
lines changed

6 files changed

+24
-18
lines changed

cls/SourceControl/Git/PullEventHandler.cls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ ClassMethod ForInternalNames(InternalName As %String) As %Status
4545
}
4646

4747
}
48+

cls/SourceControl/Git/Util/ProductionConflictResolver.cls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,4 @@ ClassMethod ResolveStream(stream As %Stream.Object)
154154
}
155155

156156
}
157+

cls/SourceControl/Git/Utils.cls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2464,3 +2464,4 @@ ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
24642464
}
24652465

24662466
}
2467+

cls/SourceControl/Git/WebUIDriver.cls

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -89,25 +89,28 @@ ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Out
8989
SimpleHTTPRequestHandler.do_POST(self)
9090
*/
9191
if (pathStart = "git") {
92-
set reference = "%request.Data"
93-
for {
94-
set reference = $query(@reference)
95-
quit:reference=""
96-
if $qsubscript(reference,3)="O" {
97-
set args(@reference)=$qsubscript(reference,1)
98-
if $data(%request.Data($qsubscript(reference,1),$qsubscript(reference,2)),argValue)#2 && (argValue '= "") {
99-
set args(@reference)=args(@reference)_"="_argValue
100-
}
101-
}
102-
}
92+
merge data = %request.Data
93+
set args = data("command",1)
94+
#; for {
95+
#; set reference = $query(@reference)
96+
#; merge ^mtempref($i(^mtempref)) = reference
97+
#; quit:reference=""
98+
#; if $qsubscript(reference,3)="O" {
99+
#; set args(@reference)=$qsubscript(reference,1)
100+
#; if $data(%request.Data($qsubscript(reference,1),$qsubscript(reference,2)),argValue)#2 && (argValue '= "") {
101+
#; set args(@reference)=args(@reference)_"="_argValue
102+
#; }
103+
#; }
104+
#; }
105+
103106

104107
// Problem: args(1) might contain $c(10) followed by our stdin value
105-
if $data(args(1))#2 {
106-
set stdin = $piece(args(1),$char(10),2,*)
107-
set args(1) = $piece(args(1),$char(10))
108+
if $data(args)#2 {
109+
set stdin = $piece(args,$char(10),2,*)
110+
set args = $piece(args,$char(10))
108111
}
109112
set readOnlyCommands = $listbuild("branch","tag","log","ls-files","ls-tree","show","status","diff")
110-
set baseCommand = $Piece(args(1)," ")
113+
set baseCommand = $Piece(args," ")
111114

112115
if $listfind(readOnlyCommands,baseCommand) {
113116
do %session.Unlock()
@@ -117,7 +120,7 @@ ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Out
117120

118121
// TODO: Don't be lazy! Implement shlex.split in ObjectScript.
119122
// The below is just a little bit cheesy.
120-
set argList = $listfromstring(args(1)," ")
123+
set argList = $listfromstring(args," ")
121124
set pointer = 0
122125
set inQuotedString = 0
123126
while $listnext(argList,pointer,arg) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ webui.git = function(cmd, arg1, arg2, arg3, arg4) {
119119
var warningCallback = arg4;
120120
}
121121

122-
$.post("git", cmd, function(data, status, xhr) {
122+
$.post("git", {command: cmd}, function(data, status, xhr) {
123123
if (xhr.status == 200) {
124124
// Convention : last lines are footer meta data like headers. An empty line marks the start if the footers
125125
var footers = {};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ webui.git = function(cmd, arg1, arg2, arg3, arg4) {
119119
var warningCallback = arg4;
120120
}
121121

122-
$.post("git", cmd, function(data, status, xhr) {
122+
$.post("git", {command: cmd}, function(data, status, xhr) {
123123
if (xhr.status == 200) {
124124
// Convention : last lines are footer meta data like headers. An empty line marks the start if the footers
125125
var footers = {};

0 commit comments

Comments
 (0)