Lines Matching full:branch
50 Returns True if the commit is actually present in the branch
61 Returns the commit hash if the commit has been backported to the branch,
87 def validate_branch(branch: str) -> str:
88 if '/' not in branch:
89 raise argparse.ArgumentTypeError('must be in the form `remote/branch`')
94 upstream, _ = branch.split('/', 1)
103 if not is_commit_valid(branch):
104 raise argparse.ArgumentTypeError('Invalid branch: ' + branch)
106 return branch
111 Returns 0 if the commit is present in the branch,
118 parser.add_argument('branch',
120 help='branch to check, in the form `remote/branch`')
130 if branch_has_commit(args.branch, args.commit):
131 print_(args, True, 'Commit ' + args.commit + ' is in branch ' + args.branch)
134 backport = branch_has_backport_of_commit(args.branch, args.commit)
137 … 'Commit ' + args.commit + ' was backported to branch ' + args.branch + ' as commit ' + backport)
140 print_(args, False, 'Commit ' + args.commit + ' is NOT in branch ' + args.branch)