Documentation
¶
Index ¶
- func ChangedLineRanges(repoPath, baseRef, headRef string) (map[string][]LineRange, error)
- func CheckoutRef(logger *zap.Logger, repoPath, ref string) error
- func CloneTemp(logger *zap.Logger, repoURL, ref string) (string, error)
- func FindRepoRoot(path string) (string, error)
- func MaterializeLocalRef(logger *zap.Logger, sourceRepoPath, ref string) (string, error)
- func VerifyRef(repoPath, ref string) error
- type LineRange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangedLineRanges ¶ added in v0.14.17
ChangedLineRanges returns added/changed head-side line ranges from a git diff. Deleted-only hunks are omitted because there is no head line for SARIF to annotate.
func CheckoutRef ¶
CheckoutRef checks out ref in repoPath.
func CloneTemp ¶
CloneTemp clones repoURL into a temporary directory and optionally checks out ref. The caller owns cleanup of the returned directory.
func FindRepoRoot ¶
FindRepoRoot resolves the git repository root for path.
func MaterializeLocalRef ¶
MaterializeLocalRef clones sourceRepoPath into a temporary directory and checks out ref. The caller owns cleanup of the returned directory.
Types ¶
Click to show internal directories.
Click to hide internal directories.