Skip to content

core: one naming pattern for status, diff and push outcomes #50

Closed

Description

@CameronBrooks11

The three outcome types in core share a package, so names were disambiguated case by case, and they don't follow one pattern:

type constants
State Unchanged, Modified, Deleted, BaselineUnknown
DiffState Changed, DiffUnchanged, DiffDeleted, NoBaseline
PushAction Pushed, WouldPush, SkipUnchanged, Conflict, PushError, NoBaselinePush

The reader can't tell which type Changed or Conflict belongs to without looking it up.

Fix: one prefix per type (StatusModified, DiffChanged, PushConflict, …). The string values stay the same, since status prints them.

Also: pullset_test.go hand-writes equal(a, b []string), which is slices.Equal (the module is on Go 1.23).

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