

def main(sysargs=None):
    from bloom.config import upconvert_bloom_to_config_branch
    upconvert_bloom_to_config_branch()
    if (len((sysargs if (sysargs is not None) else sys.argv[1:])) == 0):
        ensure_clean_working_env()
        if (not branch_exists(BLOOM_CONFIG_BRANCH)):
            sys.exit('No {0} branch found'.format(BLOOM_CONFIG_BRANCH))
        show_current()
        info("See: 'git-bloom-config -h' on how to change the configs")
        return 0
    parser = get_argument_parser()
    add_global_arguments(parser)
    args = parser.parse_args(sysargs)
    handle_global_arguments(args)
    check_git_init()
    try:
        ensure_clean_working_env()
        ensure_git_root()
    except SystemExit:
        parser.print_usage()
        raise
    try:
        args.func(args)
    except (KeyboardInterrupt, EOFError):
        error('\nUser sent a Keyboard Interrupt, aborting.', exit=True)

dataset/ETHPy150Open ros-infrastructure/bloom/bloom/commands/git/config.py main/original