summaryrefslogtreecommitdiff
path: root/buildstream/_frontend/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/_frontend/cli.py')
-rw-r--r--buildstream/_frontend/cli.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/buildstream/_frontend/cli.py b/buildstream/_frontend/cli.py
index b73771165..07880f9bd 100644
--- a/buildstream/_frontend/cli.py
+++ b/buildstream/_frontend/cli.py
@@ -777,8 +777,10 @@ def workspace_close(app, remove_dir, all_, elements):
help="Reset all open workspaces")
@click.argument('elements', nargs=-1,
type=click.Path(readable=False))
+@click.option('--fetch', 'fetch_', default=False, is_flag=True,
+ help="Enable auto-fetching of element and related junction(s)")
@click.pass_obj
-def workspace_reset(app, soft, track_, all_, elements):
+def workspace_reset(app, soft, track_, all_, elements, fetch_):
"""Reset a workspace to its original state"""
# Check that the workspaces in question exist
@@ -798,7 +800,7 @@ def workspace_reset(app, soft, track_, all_, elements):
if all_:
elements = tuple(element_name for element_name, _ in app.context.get_workspaces().list())
- app.stream.workspace_reset(elements, soft=soft, track_first=track_)
+ app.stream.workspace_reset(elements, soft=soft, track_first=track_, fetch=fetch_)
##################################################################