WIP: Add explicit `--fetch` flag to bst commands
Compare changes
This introduces a new flag --fetch
that was mentioned in the mailing list.
To put simply, this changes the following commands' behaviour so they'd not try to implicitly fetch junctions and elements (offline-first?).
bst {pull,push,track,checkout} element(s)
command
need to fetch junction
. --fetch
is supplied to fetch_subprojects
.bst source-bundle element
command
--track
: Attempt track elements, error out if there is a new ref (since no --fetch
supplied, continue if there is nothing new.--fetch
: Fetch current refs for elements (including related junctions) - they might be cached already.--fetch
and --track
: Previous behaviour of the command with --track
, track for new refs if possible and fetch them.bst {workspace-open,workspace-reset} element.bst ..
We are interested in the cases where no_checkout
is NOT used.
element
is always done. Track before fetch can be requested using --track
.--track
: Attempt track elements, error out if there is a new ref (since no --fetch
supplied, continue if there is nothing new.--fetch
: Fetch current refs for elements (including related junctions) - they might be cached already.--fetch
and --track
: Previous behaviour of the command with --track
, track for new refs if possible and fetch them.You can notice that the original behaviour of workspace commands are almost equivalent to source-bundle, except the latter implicitly fetches junctions where the former complains and terminates.
This merge request, when approved, will close: N/A at the moment.