diff options
| author | 2026-06-10 18:28:02 +0000 | |
|---|---|---|
| committer | 2026-06-10 18:28:02 +0000 | |
| commit | 42cdcaa9a0d6d7ed6c776520f646d110ebf641dc (patch) | |
| tree | 624408a6a8806044c797423b22d7ea007b9aab82 /internal/format | |
| parent | internal/format: Add doc (diff) | |
internal/format/packfile: Add simple header functions
Diffstat (limited to 'internal/format')
| -rw-r--r-- | internal/format/packfile/doc.go | 2 | ||||
| -rw-r--r-- | internal/format/packfile/header.go | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/internal/format/packfile/doc.go b/internal/format/packfile/doc.go new file mode 100644 index 00000000..d656e256 --- /dev/null +++ b/internal/format/packfile/doc.go @@ -0,0 +1,2 @@ +// Package packfile provides Git packfile format parsing primitives. +package packfile diff --git a/internal/format/packfile/header.go b/internal/format/packfile/header.go new file mode 100644 index 00000000..1a156f36 --- /dev/null +++ b/internal/format/packfile/header.go @@ -0,0 +1,9 @@ +package packfile + +// Signature is the 4-byte "PACK" magic at the start of pack files. +const Signature = 0x5041434b + +// SupportedVersion reports whether a pack version is supported. +func SupportedVersion(version uint32) bool { + return version == 2 +} |
