default=False, help="Sync tags with selected remote") parser_tags.add_argument("--checkout", dest="tags_checkout", action="store_true", default=False, help="Interactively select and checkout tag locally") parser_tags.add_argument("--tag", dest="tags_name", default="", help="Tag to checkout in non-interactive mode") args = parser.parse_args() if not is_repo(os.getcwd()): log_error("Not a git repo") sys.exit(1) repo = Repository(os.getcwd() + "/.git") config = repo.config remote_url = repo.remotes[args.remote].url pass_path = None for glob in credentials_mapping.keys(): if fnmatch.fnmatch(remote_url, glob): pass_path = credentials_mapping[glob]["target"] if args.tags_sync: remote = resolve_remote(repo, args.remote) if not remote: log_error(f"cannot find remote '{args.remote}'")
default=100, help="Minimum changed lines count threshold") # TODO: consider providing per-repo configuration parser.add_argument("--all", dest="wip_all", action="store_true", default=False, help="Stage and commit all dirty state") parser.add_argument("--push", dest="wip_push", action="store_true", default=False, help="Push WIP to default upstream") parser.add_argument("--force", dest="wip_force", action="store_true", default=False, help="Force saving WIP (ignore idle time)") parser.add_argument("--branch-ref", dest="wip_add_branch_name", action="store_true", default=False, help="Prepend WIP commit message with current branch name") args = parser.parse_args() if not is_repo(os.getcwd()): log_error("Not a git repo") sys.exit(1) repo = Repository(os.getcwd() + "/.git") config = repo.config remote_url = repo.remotes[args.remote].url pass_path = None for glob in credentials_mapping.keys(): if fnmatch.fnmatch(remote_url, glob): pass_path = credentials_mapping[glob]["target"] if not args.wip_force and not is_idle_enough("xprintidle-ng"): sys.exit(0) diff_size = get_diff_size(repo)