From 56b2945de44183286f29d8106e525167fd3d2f83 Mon Sep 17 00:00:00 2001 From: raf Date: Thu, 30 May 2019 22:25:10 -0400 Subject: [PATCH] Fix registration's params get_git_remote() --- selfdrive/registration.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/selfdrive/registration.py b/selfdrive/registration.py index 9b7e6964ef..8ec0a21009 100644 --- a/selfdrive/registration.py +++ b/selfdrive/registration.py @@ -22,7 +22,9 @@ def get_git_branch(): return subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).strip() def get_git_remote(): - return subprocess.check_output(["git", "config", "--get", "remote.origin.url"]).strip() + local_branch = subprocess.check_output(["git", "name-rev", "--name-only", "HEAD"]).strip() + tracking_remote = subprocess.check_output(["git", "config", "branch."+local_branch+".remote"]).strip() + return subprocess.check_output(["git", "config", "remote."+tracking_remote+".url"]).strip() def register(): params = Params()