# Path: gg/main.py
# DEFAULT_CONFIGFILE = os.path.expanduser("~/.gg.json")
# class Config:
#     def __init__(self):
# def cli(config, configfile, verbose):
# 
# Path: gg/utils.py
# def error_out(msg, raise_abort=True):
#     click.echo(click.style(msg, fg="red"))
#     if raise_abort:
#         raise click.Abort
# 
# def info_out(msg):
#     click.echo(msg)
# 
# def success_out(msg):
#     click.echo(click.style(msg, fg="green"))
# 
# def warning_out(msg):
#     click.echo(click.style(msg, fg="yellow"))


import datetime
import click
import git
from gg.main import cli, pass_config
from gg.utils import error_out, info_out, success_out, warning_out
        if not click.confirm(
            f"Add remote {remote_search_name!r} ({remote_url})", default=True
        ):
            error_out("Unable to find or create remote")

        repo.create_remote(remote_search_name, remote_url)
        branches_ = list(find(repo, searchstring))

    if branches_:
        merged = get_merged_branches(repo)
        info_out("Found existing branches...")
        print_list(branches_, merged, cutoff=cutoff)
        if len(branches_) == 1 and searchstring:
            # If the found branch is the current one, error
            active_branch = repo.active_branch
            if active_branch == branches_[0]:
                error_out(f"You're already on {branches_[0].name!r}")
            branch_name = branches_[0].name
            if len(branch_name) > 50:
                branch_name = branch_name[:47] + "…"

            if not yes:
                check_it_out = (
                    input(f"Check out {branch_name!r}? [Y/n] ").lower().strip() != "n"
                )
            if yes or check_it_out:
                branches_[0].checkout()
    elif searchstring:
        warning_out(f"Found no branches matching {searchstring!r}.")
    else:

# Path: gg/main.py
# DEFAULT_CONFIGFILE = os.path.expanduser("~/.gg.json")
# class Config:
#     def __init__(self):
# def cli(config, configfile, verbose):
# 
# Path: gg/utils.py
# def error_out(msg, raise_abort=True):
#     click.echo(click.style(msg, fg="red"))
#     if raise_abort:
#         raise click.Abort
# 
# def info_out(msg):
#     click.echo(msg)
# 
# def success_out(msg):
#     click.echo(click.style(msg, fg="green"))
# 
# def warning_out(msg):
#     click.echo(click.style(msg, fg="yellow"))


# Path: gg/builtins/branches/gg_branches.py
import datetime
import click
import git
from gg.main import cli, pass_config
from gg.utils import error_out, info_out, success_out, warning_out

        if not click.confirm(
            f"Add remote {remote_search_name!r} ({remote_url})", default=True
        ):
            error_out("Unable to find or create remote")

        repo.create_remote(remote_search_name, remote_url)
        branches_ = list(find(repo, searchstring))

    if branches_:
        merged = get_merged_branches(repo)
        info_out("Found existing branches...")
        print_list(branches_, merged, cutoff=cutoff)
        if len(branches_) == 1 and searchstring:
            # If the found branch is the current one, error
            active_branch = repo.active_branch
            if active_branch == branches_[0]:
                error_out(f"You're already on {branches_[0].name!r}")
            branch_name = branches_[0].name
            if len(branch_name) > 50:
                branch_name = branch_name[:47] + "…"

            if not yes:
                check_it_out = (
                    input(f"Check out {branch_name!r}? [Y/n] ").lower().strip() != "n"
                )
            if yes or check_it_out:
                branches_[0].checkout()
    elif searchstring:
        warning_out(f"Found no branches matching {searchstring!r}.")
    else:

        warning_out("Found no branches.")