[rush] "rush change" fails to fetch origin/master in certain situations #1177
Labels
bug
Something isn't working as intended
effort: easy
Probably a quick fix. Want to contribute? :-)
help wanted
If you're looking to contribute, this issue is a good place to start!
repro confirmed
The issue comments included repro instructions, and the maintainers reproduced the problem
Repro steps:
origin/master
to commit hash e444346.raygesualdo:partial-prereleases
from PR [rush] added partial prerelease functionality #1175.partial-prereleases
branch to commit hash 8cee308rush change
Expected: It should prompt for changes for the @microsoft/rush project only.
Actual:
rush change
wants change longs for ALL projects in the repo.What's going on: The
rush change
command invokes VersionControl.getChangedFolders() which executes this command:But it finds a huge diff because origin/master is not up to date. Before running this command,
rush change
was supposed to fetch changes using VersionControl._fetchNonDefaultBranch():However, the fetching is skipped because
remoteBranchName === "origin/master"
. If I delete the if-statement, then the changes are fetched, the diff is correct, andrush change
prompts for changes ONLY for the @microsoft/rush project.(Thanks #1175 (comment) for reporting this!)
The text was updated successfully, but these errors were encountered: