Skip to content

Commit f9a3761

Browse files
committed
Merge remote-tracking branch 'github/1040-Z-DATA-ERROR-during-push-parsing' into 1040-Z-DATA-ERROR-during-push-parsing
2 parents 7e0a9f1 + 973e1a0 commit f9a3761

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/proxy/processors/push-action/parsePush.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,21 @@ interface GitObjectHeader {
341341
baseSha?: Buffer;
342342
}
343343

344+
type GitObjectType =
345+
| 'commit'
346+
| 'tree'
347+
| 'blob'
348+
| 'tag'
349+
| 'ofs_delta'
350+
| 'ref_delta'
351+
| unknown;
352+
344353
/**
345354
* Maps Git object type codes to human-readable names.
346355
* @param {number} typeCode Numeric type code from PACK file.
347-
* @return {string} Git object type as string.
356+
* @return {GitObjectType} Git object type
348357
*/
349-
const gitObjectType = (typeCode: number): string => {
358+
const gitObjectType = (typeCode: number): GitObjectType => {
350359
switch (typeCode) {
351360
case 1:
352361
return 'commit';

0 commit comments

Comments
 (0)