mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge pull request #1269 from pre-commit/remove_tags_only
Remove autoupdate --tags-only option
This commit is contained in:
commit
ef583d2fde
2 changed files with 0 additions and 10 deletions
|
|
@ -165,9 +165,6 @@ def main(argv=None):
|
||||||
)
|
)
|
||||||
_add_color_option(autoupdate_parser)
|
_add_color_option(autoupdate_parser)
|
||||||
_add_config_option(autoupdate_parser)
|
_add_config_option(autoupdate_parser)
|
||||||
autoupdate_parser.add_argument(
|
|
||||||
'--tags-only', action='store_true', help='LEGACY: for compatibility',
|
|
||||||
)
|
|
||||||
autoupdate_parser.add_argument(
|
autoupdate_parser.add_argument(
|
||||||
'--bleeding-edge', action='store_true',
|
'--bleeding-edge', action='store_true',
|
||||||
help=(
|
help=(
|
||||||
|
|
@ -312,8 +309,6 @@ def main(argv=None):
|
||||||
store.mark_config_used(args.config)
|
store.mark_config_used(args.config)
|
||||||
|
|
||||||
if args.command == 'autoupdate':
|
if args.command == 'autoupdate':
|
||||||
if args.tags_only:
|
|
||||||
logger.warning('--tags-only is the default')
|
|
||||||
return autoupdate(
|
return autoupdate(
|
||||||
args.config, store,
|
args.config, store,
|
||||||
tags_only=not args.bleeding_edge,
|
tags_only=not args.bleeding_edge,
|
||||||
|
|
|
||||||
|
|
@ -190,8 +190,3 @@ def test_expected_fatal_error_no_git_repo(in_tmpdir, cap_out, mock_store_dir):
|
||||||
'Is it installed, and are you in a Git repository directory?'
|
'Is it installed, and are you in a Git repository directory?'
|
||||||
)
|
)
|
||||||
assert cap_out_lines[-1] == 'Check the log at {}'.format(log_file)
|
assert cap_out_lines[-1] == 'Check the log at {}'.format(log_file)
|
||||||
|
|
||||||
|
|
||||||
def test_warning_on_tags_only(mock_commands, cap_out, mock_store_dir):
|
|
||||||
main.main(('autoupdate', '--tags-only'))
|
|
||||||
assert '--tags-only is the default' in cap_out.get()
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue