MCPcopy Create free account
hub / github.com/LegacyCodeHQ/clarity-cli / parseCommitRange

Function parseCommitRange

cmd/show/show_cmd.go:597–616  ·  view source on GitHub ↗
(opts *graphOptions)

Source from the content-addressed store, hash-verified

595}
596
597func parseCommitRange(opts *graphOptions) (string, string, bool, error) {
598 var fromCommit, toCommit string
599 var isCommitRange bool
600
601 if opts.commitID == "" {
602 return "", "", false, nil
603 }
604
605 fromCommit, toCommit, isCommitRange = git.ParseCommitRange(opts.commitID)
606 if !isCommitRange {
607 return fromCommit, toCommit, isCommitRange, nil
608 }
609
610 fromCommit, toCommit, _, err := git.NormalizeCommitRange(opts.repoPath, fromCommit, toCommit)
611 if err != nil {
612 return "", "", false, fmt.Errorf("failed to normalize commit range: %w", err)
613 }
614
615 return fromCommit, toCommit, isCommitRange, nil
616}
617
618func determineFilePaths(cmd *cobra.Command, opts *graphOptions, pathResolver PathResolver, snapshot *snapshotResolver, fromCommit, toCommit string, isCommitRange bool) ([]string, []string, bool, error) {
619 if opts.all {

Callers 1

runGraphFunction · 0.85

Calls 2

ParseCommitRangeFunction · 0.92
NormalizeCommitRangeFunction · 0.92

Tested by

no test coverage detected