@@ -361,11 +361,12 @@ pub struct SmartlogArgs {
361361/// The Git hosting provider to use, called a "forge".
362362#[ derive( Clone , Debug , ValueEnum ) ]
363363pub enum ForgeKind {
364- /// Force-push branches to the default push remote.
364+ /// Force-push branches to the default push remote. You can configure the
365+ /// default push remote with `git config remote.pushDefault <remote>`.
365366 Branch ,
366367
367368 /// Force-push branches to the remote and create a pull request for each
368- /// branch using the `gh` command-line tool.
369+ /// branch using the `gh` command-line tool. WARNING: likely buggy!
369370 Github ,
370371
371372 /// Submit code reviews to Phabricator using the `arc` command-line tool.
@@ -375,42 +376,45 @@ pub enum ForgeKind {
375376/// Push commits to a remote.
376377#[ derive( Debug , Parser ) ]
377378pub struct SubmitArgs {
378- /// If there is no remote branch for a given local branch, create the
379- /// remote branch by pushing the local branch to the default push
380- /// remote.
381- ///
382- /// You can configure the default push remote with `git config
383- /// remote.pushDefault <remote>`.
384- #[ clap( action, short = 'c' , long = "create" ) ]
385- pub create : bool ,
386-
387- /// If the remote supports it, create code reviews in "draft" mode.
388- #[ clap( action, short = 'd' , long = "draft" ) ]
389- pub draft : bool ,
390-
391- /// What kind of execution strategy to use for tools which need access to the working copy.
392- #[ clap( short = 's' , long = "strategy" ) ]
393- pub strategy : Option < TestExecutionStrategy > ,
394-
395- /// The commits to push. All branches attached to those commits will be
396- /// pushed.
379+ /// The commits to push to the forge. Unless `--create` is passed, this will
380+ /// only push commits that already have associated remote objects on the
381+ /// forge.
397382 #[ clap( value_parser, default_value = "stack()" ) ]
398383 pub revsets : Vec < Revset > ,
399384
400385 /// Options for resolving revset expressions.
401386 #[ clap( flatten) ]
402387 pub resolve_revset_options : ResolveRevsetOptions ,
403388
404- /// The Git hosting provider to use.
389+ /// The Git hosting provider to use, called a "forge". If not provided, an
390+ /// attempt will be made to automatically detect the forge used by the
391+ /// repository. If no forge can be detected, will fall back to the "branch"
392+ /// forge.
405393 #[ clap( short = 'F' , long = "forge" ) ]
406- pub forge : Option < ForgeKind > ,
394+ pub forge_kind : Option < ForgeKind > ,
407395
408- /// An optional message to include with the create or update operation.
396+ /// If there is no associated remote commit or code review object for a
397+ /// given local commit, create the remote object by pushing the local commit
398+ /// to the forge.
399+ #[ clap( action, short = 'c' , long = "create" ) ]
400+ pub create : bool ,
401+
402+ /// If the forge supports it, create code reviews in "draft" mode.
403+ #[ clap( action, short = 'd' , long = "draft" ) ]
404+ pub draft : bool ,
405+
406+ /// If the forge supports it, an optional message to include with the create
407+ /// or update operation.
409408 #[ clap( short = 'm' , long = "message" ) ]
410409 pub message : Option < String > ,
411410
411+ /// If the forge supports it and uses a tool that needs access to the
412+ /// working copy, what kind of execution strategy to use.
413+ #[ clap( short = 's' , long = "strategy" ) ]
414+ pub execution_strategy : Option < TestExecutionStrategy > ,
415+
412416 /// Don't push or create anything. Instead, report what would be pushed or
413- /// created. (Still triggers a fetch .)
417+ /// created. (This may still trigger fetching information from the forge .)
414418 #[ clap( short = 'n' , long = "dry-run" ) ]
415419 pub dry_run : bool ,
416420}
0 commit comments