We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a83f566 commit 59642dfCopy full SHA for 59642df
src/proxy/processors/push-action/parsePush.ts
@@ -131,11 +131,14 @@ const getParsedData = (headerLines: string[]) => {
131
} = { parents: [] };
132
133
for (const line of headerLines) {
134
- const spaceIndex = line.indexOf(' ');
135
- if (spaceIndex === -1) continue;
+ const firstSpaceIndex = line.indexOf(' ');
+ if (firstSpaceIndex === -1) {
136
+ // No spaces
137
+ continue;
138
+ }
139
- const key = line.substring(0, spaceIndex);
- const value = line.substring(spaceIndex + 1);
140
+ const key = line.substring(0, firstSpaceIndex);
141
+ const value = line.substring(firstSpaceIndex + 1);
142
143
switch (key) {
144
case 'tree':
0 commit comments