Skip to content

git-refs pre-push: show push progress instead of a silent stall#1632

Merged
Soph merged 1 commit into
mainfrom
feat/git-refs-push-progress
Jul 6, 2026
Merged

git-refs pre-push: show push progress instead of a silent stall#1632
Soph merged 1 commit into
mainfrom
feat/git-refs-push-progress

Conversation

@Soph

@Soph Soph commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

https://entire.io/gh/entireio/cli/trails/756

What

The git-refs pre-push path pushed the queued per-checkpoint refs via batchPushRefs with no output. Pushing a large backlog (e.g. after a bulk import/migration) looked like git push had hung for 30+ seconds, while git itself only reported Everything up-to-date for the branch.

Change

Mirror the v1-branch path's existing progress line in prePushCheckpointRefs:

[entire] Pushing 381 checkpoint ref(s) to origin......... done
  • Uses the same startProgressDots ticker the v1 path (doPushRef) already uses, written to stderr (which git surfaces during the pre-push hook).
  • The fast batch path prints ... done; if some refs need the per-ref fetch+replay recovery, that path gets its own line ending in pushed X of N.
  • No behavior change to the push itself — purely user-facing progress.

Why it's safe / scoped

  • 14 lines, one file (manual_commit_push.go); the git-refs push machinery it wraps is already on main.
  • Matches the established v1 progress pattern exactly (same helper, same unconditional-to-stderr behavior).
  • mise run lint clean; strategy suite passes.

🤖 Generated with Claude Code


Note

Low Risk
User-facing stderr output only; no changes to push, queue, or recovery behavior.

Overview
Adds user-visible progress to the git-refs pre-push path in prePushCheckpointRefs, which previously pushed queued checkpoint refs with no output during long batch operations.

Before the batch fast-forward push, it prints [entire] Pushing N checkpoint ref(s) to <target>... on stderr and runs the same startProgressDots helper the v1 doPushRef path already uses, finishing with done on success. If batch push fails and the code falls back to per-ref fetch+replay recovery, it prints a second line and ends with pushed X of N.

Push behavior, queue handling, and recovery logic are unchanged—display only (fmt import added for this).

Reviewed by Cursor Bugbot for commit a4b3f75. Configure here.

The git-refs pre-push path pushed the queued checkpoint refs via batchPushRefs
with no output, so pushing a large backlog (e.g. a freshly migrated repo) looked
like git had hung for 30+ seconds while `git push` reported only "Everything up
to date" for the branch.

Mirror the v1-branch path's progress line: print "[entire] Pushing N checkpoint
ref(s) to <target>..." with the shared startProgressDots ticker to stderr (which
git surfaces during the pre-push hook), and a " done" / "pushed X of N" suffix.
The per-ref fetch+replay recovery path gets its own progress line too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: f55c74d61baf
Copilot AI review requested due to automatic review settings July 4, 2026 20:43
@Soph Soph requested a review from a team as a code owner July 4, 2026 20:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the user experience of the git-refs pre-push hook in the manual-commit strategy by adding stderr progress output while pushing a backlog of queued per-checkpoint refs. This avoids git push appearing to hang during long-running checkpoint ref pushes, and mirrors the existing progress-dot behavior used for the v1-branch push path.

Changes:

  • Print a “[entire] Pushing N checkpoint ref(s) …” progress line to stderr before the fast-path batchPushRefs call, with dot-ticker output and a “done” suffix on success.
  • When the fast path fails and the code falls back to per-ref recovery, print a second progress line and finish with a “pushed X of N” suffix.

@Soph Soph merged commit 78cf511 into main Jul 6, 2026
12 checks passed
@Soph Soph deleted the feat/git-refs-push-progress branch July 6, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants