Skip to content

Add --commit-interval option for fixed-interval playback#359

Open
Ludu-nuvai wants to merge 1 commit intoacaudwell:masterfrom
Ludu-nuvai:feature/commit-interval
Open

Add --commit-interval option for fixed-interval playback#359
Ludu-nuvai wants to merge 1 commit intoacaudwell:masterfrom
Ludu-nuvai:feature/commit-interval

Conversation

@Ludu-nuvai
Copy link

Summary

  • Adds --commit-interval SECONDS option that spaces commits at a fixed time interval regardless of real timestamps
  • Commits remain chronologically ordered but each one appears exactly N seconds after the previous
  • Auto-skip is automatically disabled when using this mode
  • Useful for demos/presentations where clarity between commits matters more than historical time accuracy

Closes #357

Usage

gource --commit-interval 4

Each commit will appear 4 seconds after the previous one, regardless of actual commit dates.

Implementation

  • Timestamps are remapped in readLog() as commits are read from the log: new_timestamp = first_commit_time + (commit_index * interval)
  • The original chronological ordering is preserved
  • --auto-skip-seconds is disabled since fixed intervals make it redundant

Test plan

  • Build and run with --commit-interval 4 on a repository
  • Verify commits appear at regular intervals
  • Verify it works with --stop-at-end, --loop, and other timing options
  • Verify --seconds-per-day still controls animation speed between commits
  • Verify auto-skip is correctly disabled

🤖 Generated with Claude Code

Adds a new --commit-interval SECONDS option that spaces commits at a
fixed time interval regardless of their real timestamps. This is useful
for demos and presentations where clarity between commits matters more
than historical time accuracy.

When active, commit timestamps are remapped so each commit appears
exactly N seconds after the previous one, while preserving chronological
order. Auto-skip is automatically disabled in this mode.

Closes acaudwell#357

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: --commit-interval (commit-based playback)

1 participant