Commit Graph

6 Commits

Author SHA1 Message Date
LyAhn f4286edff2 fix(sync): stop reporting success when no branch was actually synced
hub sync silently dropped any local branch whose upstream it could not
resolve: it cleared its internal remote branch while leaving the "gone"
flag false, so neither the update nor the delete path ran. A run could
then print "Already up to date" having done nothing, which is why a
workspace-wide sync looked like it worked when it did not.

- report unmatched branches as UNTRACKED with the reason, so
  "Already up to date" is only said when it is true
- resolve the remote default branch via `git ls-remote --symref` when
  refs/remotes/<remote>/HEAD is missing, so merged branches whose
  upstream was deleted are still cleaned up
- make --create-missing opt-in, keeping hub's default of never creating
  a local branch that does not already exist
- summarise runs as changed/unchanged with per-action counts, and list
  deletions and failures in full instead of leaving them in scrollback
- restore per-command flag help, which the custom Usage had dropped
- add an in-place CLI progress line, drawn only to a terminal so piped
  and --json output stay free of cursor control
- group the TUI selection screen by outcome so blocked and dirty
  repositories are visible before a run starts

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-09-28 19:57:42 +01:00
LyAhn 4f6e9c9991 feat(tui): show per-repository sync progress
- emit start and finish events from the concurrent sync worker pool
- show elapsed time, a progress bar, active repositories, result counts, and the latest result
- retain failures, skips, protected branches, and divergence warnings after the run
- focus the first failed repository and add f to cycle through repositories requiring attention
- add progress and summary tests, document the new controls, and set version 0.3.1
2026-09-06 20:19:05 +01:00
LyAhn bf67f1a005 feat(sync): remove the hub dependency
- add sync.go to fetch and prune the selected upstream, github, origin, or sole remote
- fast-forward the current branch with merge --ff-only and inactive branches with update-ref
- protect a dirty current branch and branches checked out in linked worktrees
- warn without changing divergent branches
- delete gone-upstream branches only after confirming they are merged into the remote default branch
- allow dirty repositories by default and retain the all-clean policy behind --strict
- return per-branch results in CLI, JSON, and TUI output
- add bare-remote integration tests, the hub MIT notice, and version 0.3.0
2026-09-06 19:41:53 +01:00
LyAhn 88143838dd fix(test): run the hub fixture on Windows
- replace the POSIX shell fixture with a compiled Go helper named hub or hub.exe
- prepend the helper directory to PATH in TestMain so tests cannot invoke an installed hub binary
- add PowerShell build, install, and Windows path examples to the README
- ignore the generated stack-sync.exe binary
2026-09-06 19:23:15 +01:00
LyAhn e397da2733 feat(tui): add repository picker
- add the tui command using Bubble Tea and Lip Gloss
- preselect eligible repositories and disable selection for blocked repositories
- add keyboard controls for navigation, selection, refresh, sync, and cancellation
- require confirmation before sync and show the branch-deletion warning
- show dirty paths, block reasons, and hub output for the focused repository
- add TUI model tests and set the embedded version to 0.2.0
2026-09-06 18:34:05 +01:00
LyAhn 717ae0addb feat(cli): add scan and sync commands
- discover nested Git repositories and skip dependency and build directories
- add scan and sync commands with root, exclude, jobs, timeout, JSON, strict, and confirmation options
- block detached heads, missing remotes, active Git operations, and dirty worktrees
- exclude nested repositories from their parent's dirty-worktree check
- recheck repository safety before running hub sync
- add discovery, safety, sync, JSON, and output tests
- set the embedded version to 0.1.1 and document installation and usage
2026-09-06 18:29:50 +01:00