bin/braid in braid-1.0.10 vs bin/braid in braid-1.0.11

- old
+ new

@@ -53,24 +53,30 @@ Update a braid mirror. * get new changes from remote * always creates a merge commit * updates metadata in .braids.json when revisions are changed + * removes the git remote by default, --keep can be used to suppress that Defaults to updating all unlocked mirrors if none is specified. TXT examples <<-TXT . braid update . braid update local/dir TXT - mixin :optional_path, :option_revision, :option_head, :option_verbose + mixin :optional_path, :option_revision, :option_head, :option_verbose, :option_keep_remote run { + options = { + 'revision' => revision, + 'head' => head, + 'keep' => keep + } Braid.verbose = verbose - Braid::Command.run(:update, path, {'revision' => revision, 'head' => head}) + Braid::Command.run(:update, path, options) } } mode(:remove) { description <<-TXT @@ -86,12 +92,12 @@ TXT mixin :argument_path, :option_verbose, :option_keep_remote run { - options = { - :keep => keep + options = { + :keep => keep } Braid.verbose = verbose Braid::Command.run(:remove, path, options) } } @@ -99,27 +105,33 @@ mode(:diff) { description <<-TXT Show diff of local changes to mirror. TXT - mixin :argument_path, :option_verbose + mixin :optional_path, :option_verbose, :option_keep_remote run { - Braid::Command.run(:diff, path) + options = { + 'keep' => keep + } + Braid::Command.run(:diff, path, options) } } mode(:push) { description <<-TXT Push local mirror changes to remote. TXT - mixin :argument_path, :option_verbose + mixin :argument_path, :option_verbose, :option_keep_remote run { + options = { + 'keep' => keep + } Braid.verbose = verbose - Braid::Command.run(:push, path) + Braid::Command.run(:push, path, options) } } mode(:setup) { description <<-TXT @@ -149,9 +161,20 @@ mixin :option_verbose run { Braid.verbose = verbose Braid::Command.run(:list) + } + } + + mode(:status) { + description 'Show the status of all tracked mirrors (and if updates are available).' + + mixin :optional_path, :option_verbose + + run { + Braid.verbose = verbose + Braid::Command.run(:status, path) } } mixin(:argument_path) { argument(:path) {