Skip to content

push: report titles that aren't tracked #24

Closed

Description

@CameronBrooks11

What

push silently ignores a title that isn't tracked and reports there's nothing to
do. diff warns about the same title.

Reproduced with v0.2.1, after wikisync pull --dir D "User:CameronBrooks11/sandbox"
and editing that file:

$ wikisync push --dir D "User:CameronBrooks11/sandbx"
no local changes to push            # exit 0
$ wikisync diff --dir D "User:CameronBrooks11/sandbx"
diff: "User:CameronBrooks11/sandbx" is not tracked (run 'wikisync pull' first)
no local changes                    # exit 0
$ wikisync push --dir D "User:CameronBrooks11/sandbox"
would push "User:CameronBrooks11/sandbox"

Why

With --apply, a typo in a page title looks like a successful run that had
nothing to publish, so the edit is never pushed and nothing says so.

Where

core.Push (internal/core/push.go) builds selected only from titles found in
the manifest; cmdPush in main.go doesn't compare the requested titles with
the results, as cmdDiff does.

Acceptance criteria

  • push with a title that isn't tracked reports it on stderr, like diff,
    and exits non-zero (it was asked to publish something it can't).
  • A test fails on the current behaviour and passes with the fix.
  • docs/commands.md no longer needs the "check the spelling against
    status" caveat.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions