`--progress` · Entire

--progress

Sessions

Transcript data is unavailable for this checkpoint.

Changes

4

77 unmodified lines

excludeRefPrefixFlag(cmd, &req.ExcludeRefPrefixes)
addProtocolFlag(cmd, &protocolVal)
cmd.Flags().BoolVarP(&req.Verbose, "verbose", "v", false, "verbose logging")
cmd.Flags().BoolVar(&req.Progress, "progress", false,
    "show live per-phase object counts on stderr (TTY only)")
cmd.Flags().BoolVar(&req.KeepSourceObjects, "keep-source-objects", false,
    "keep the temporary SHA1 store on disk after conversion (for debugging)")
cmd.Flags().StringVar(&req.MappingFile, "write-mapping", "",
Mcmd/git-sync/convert_sha256.go+2

29 unmodified lines
// Function Definitions
func (t *translator) snapshotCounts() Counts {
    return Counts{
        Blobs:   int(t.blobs.Load()),
        Trees:   int(t.trees.Load()),
        Commits: int(t.commitsCount.Load()),
        Tags:    int(t.tags.Load()),
    }
}

func discoverReachable(src storer.Storer, roots []plumbing.Hash) (map[plumbing.Hash]plumbing.ObjectType, error) {
    // Logic to discover reachable objects
    // If progress is non-nil, it is incremented once per object visited.
}

// Discovery methods
func writeMappingFile(...) {
    // Implementation for writing the SHA1 → SHA256 mapping
}
// Example constant definition
const (
    // Excluded options
    SkipOption = "--skip"
)
// Example command-line flag setup
flags.BoolVar(&req.Progress, "progress", false, "show live per-phase object counts")
flags.StringVar(&req.MappingFile, "write-mapping", "", "path to mapping file")

Additional Code Blocks

reachable, err := discoverReachable(srcRepo.Storer, []plumbing.Hash{tagHash})
if err != nil {
    // Handle error
}
// Message-reference edges
// Not part of this pass; those are added during translation.