Date: Fri, 24 Jul 2026 21:11:24 +0000 From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: b86e36493469 - main - git-mfc: Improve handling of remotes Message-ID: <6a63d4fc.38e45.3181dfca@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b86e36493469ded108ad616ebc094886b33851c4 commit b86e36493469ded108ad616ebc094886b33851c4 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2026-07-24 21:10:26 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2026-07-24 21:10:26 +0000 git-mfc: Improve handling of remotes If we can't figure out which remote to use, print a useful error instead of assuming that "freebsd" is the right remote to use. --- tools/tools/git/git-mfc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/tools/git/git-mfc b/tools/tools/git/git-mfc index 431ed2ebc861..c6c4ea2b786a 100755 --- a/tools/tools/git/git-mfc +++ b/tools/tools/git/git-mfc @@ -501,11 +501,11 @@ def main(): if args.remote: remote = args.remote else: - try: - tracking = repo.active_branch.tracking_branch() - remote = tracking.remote_name if tracking else 'freebsd' - except (TypeError, ValueError): - remote = 'freebsd' + tracking = repo.active_branch.tracking_branch() + if tracking: + remote = tracking.remote_name + else: + err(1, "could not find upstream branch, use --remote") upstream = remote + '/' + originhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a63d4fc.38e45.3181dfca>
