INNER CODE UNIT · Go
displayStats
umputun/ralphex · cmd/ralphex/main.go:520
func displayStats(req executePlanRequest, baseLog *progress.Logger, stats git.DiffStats, elapsed, branch string,
planMoved bool, planMoveErr error) {
if stats.Files > 0 {
baseLog.LogDiffStats(stats.Files, stats.Additions, stats.Deletions)
req.Colors.Info().Printf("\ncompleted in %s (%d files, +%d/-%d lines)\n",
elapsed, stats.Files, stats.Additions, stats.Deletions)
} else {
req.Colors.Info().Printf("\ncompleted in %s\n", elapsed)
}
planPath, planNote := "", ""
if req.PlanFile != "" {
planPath = req.PlanFile
if planMoved {
planPath = filepath.Join(filepath.Dir(req.PlanFile), "completed", filepath.Base(req.PlanFile))
// in worktree mode the archive exists only in the branch's history: the worktree is
// deleted moments later and the main checkout keeps the user's own untouched copy,
// so an unqualified path names a file that is about to resolve to nothing.