Documentation
¶
Overview ¶
Package source resolves input paths (directories, archives, git URLs) into local directories suitable for the analysis pipeline. Archives and git clones are cached under ~/.gfy/ for fast re-runs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Info ¶
type Info struct {
SourceDir string // local directory to analyze
OutDir string // where to write gfy output
}
Info holds the resolved source and output paths.
func Resolve ¶
Resolve examines inputPath and returns resolved local paths.
- Local directory → use as-is
- Archive (.zip, .tar, .tar.gz, .tgz) → extract to ~/.gfy/archive/<hash>/
- Git URL → clone to ~/.gfy/git/<hash>/
outFlag overrides the default output directory when non-empty.
func ResolveForBranch ¶
ResolveForBranch clones a specific branch of a repository into a cached directory under ~/.gfy/compare/<hash>/<branch>/. The repoPath can be a local directory or git URL.
type TrackingInfo ¶
type TrackingInfo struct {
LocalBranch string // e.g., "feature-x"
Remote string // e.g., "origin"
RemoteBranch string // e.g., "main"
RemoteURL string // e.g., "https://github.com/user/repo.git"
}
TrackingInfo holds the current branch and its remote tracking branch.
func DetectTracking ¶
func DetectTracking(repoPath string) (*TrackingInfo, error)
DetectTracking opens the git repo at repoPath and determines: 1. Current HEAD branch 2. The configured remote tracking branch (from .git/config) 3. The remote URL for cloning