Documentation
¶
Index ¶
- func BlobContent(ref Ref, path string, repoDir string) ([]byte, bool, error)
- func CommitDiff(hash, repoDir string) (string, error)
- func IsBinary(b []byte) bool
- func ParseFileMode(modeStr string) (string, error)
- func RefToFileName(ref string) string
- type Blob
- type Commit
- type Ref
- type RefKind
- type RefName
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommitDiff ¶
func IsBinary ¶
IsBinary performs a heuristic check to determine if data is binary. Rules:
- Any NUL byte => binary
- Consider only a sample (up to 8 KiB). If >30% of bytes are control characters outside the common whitespace/newline range, treat as binary.
func ParseFileMode ¶
ParseFileMode converts a git-style file mode (e.g. "100644") into a human-readable string like "rw-r--r--".
func RefToFileName ¶ added in v1.0.1
Types ¶
type Commit ¶
Click to show internal directories.
Click to hide internal directories.