isSameRevision method

bool isSameRevision(
  1. LockedPackage other
)

A locked package is identified by its source, (git, requested ref, path), as pub identifies a git dependency, and then by its commit. select and _checkout look entries up by that source, so two refs at one commit are still two packages and may not share one entry.

Implementation

bool isSameRevision(LockedPackage other) =>
    git == other.git &&
    requestedRef == other.requestedRef &&
    path == other.path &&
    commit == other.commit;