Skip to content

fix: report push titles that aren't tracked - #36

Merged
CameronBrooks11 merged 1 commit into
mainfrom
fix/push-untracked-titles
Nov 11, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
fix/push-untracked-titles

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Closes #24.

push silently skipped a title missing from the manifest and printed "no
local changes to push" with exit 0, so a mistyped title looked like a run with
nothing to publish. It now names each such title on stderr, as diff does, and
exits 1. That applies in a tracked tree, alongside real pages, and in an empty
tree.

Before and after

The issue's reproduction, run with this branch's build against a tree pulled
from Appropedia (read-only preview):

$ wikisync push --dir t "User:CameronBrooks11/sandbx"
push: "User:CameronBrooks11/sandbx" is not tracked (run 'wikisync pull' first)
exit=1                                   # was: "no local changes to push", exit 0

$ wikisync push --dir t "User:CameronBrooks11/sandbox" "User:CameronBrooks11/sandbx"
push: "User:CameronBrooks11/sandbx" is not tracked (run 'wikisync pull' first)
would push "User:CameronBrooks11/sandbox"
exit=1

Tests

TestPushReportsUntrackedTitles covers four cases:

  • a clean tracked page: exit 0, the control
  • a typo in a tracked tree
  • a typo alongside a tracked page
  • a title in an empty tree

The three typo cases failed before the fix with exit 0. Removing either of the
two new call sites fails the cases it covers.

docs/commands.md drops its "check the spelling against status" caveat, and
the exit-code table lists the new case. The CHANGELOG has a Fixed entry under
Unreleased.

push silently skipped a title missing from the manifest and printed
"no local changes to push" with exit 0, so a mistyped title looked
like a run with nothing to publish. It now names each such title on
stderr, as diff does, and exits 1, in a tracked tree and in an empty
one.

Closes #24
@CameronBrooks11
CameronBrooks11 merged commit d7c079e into main Nov 11, 2026
8 checks passed
@CameronBrooks11
CameronBrooks11 deleted the fix/push-untracked-titles branch November 11, 2026 02:21
CameronBrooks11 added a commit that referenced this pull request Nov 11, 2026
Prepares v0.3.1: the version constant becomes 0.3.1, and the CHANGELOG's
Unreleased section becomes 0.3.1. User-facing change since v0.3.0: #36
(push reports titles that aren't tracked, #24). CI action updates since
then: #27, #30, #31, #34, #35. This tag is the first run of the updated
release workflow (goreleaser-action 7, checkout 7, setup-go 7). The tag
is pushed after this merges.
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.

push: report titles that aren't tracked

1 participant