args.always_fetch = True
args.skip_conflict_check = True
+ if args.credits:
+ try:
+ c = resolve_ref(G, 'main', BASE_REMOTE_URL, args.always_fetch)
+ githubmap_content = G.git.show(f"{c.hexsha}:.githubmap")
+ comment = re.compile(r"\s*#")
+ patt = re.compile(r"([\w-]+)\s+(.*)")
+ for line in githubmap_content.splitlines():
+ if comment.match(line):
+ continue
+ m = patt.match(line)
+ if m:
+ CONTRIBUTORS[m.group(1)] = m.group(2)
+ except git.exc.GitCommandError as e:
+ raise SystemExit(f"Could not fetch .githubmap from {BASE_REMOTE_URL}:main:\n{e}")
+
# Compute branch names now that integration flags and auto-detect have settled
- branch = datetime.datetime.utcnow().strftime(args.branch).format(user=USER)
+ branch = datetime.datetime.now(datetime.UTC).strftime(args.branch).format(user=USER)
if args.branch_release:
branch = branch + "-" + args.branch_release
if args.branch_append: