Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
desmondcheongzx committed Jan 27, 2025
1 parent 910940b commit 2329c92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/git_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ def get_name_and_commit_hash(local_branch_name: Optional[str]) -> tuple[str, str
# Strip the upstream name from the branch to get the remote branch name.
remote_branch_name = remote_branch_name.split("/", 1)[1]
commit_hash = (
subprocess.check_output(["git", "rev-parse", local_branch_name], stderr=subprocess.STDOUT).strip().decode("utf-8")
subprocess.check_output(["git", "rev-parse", local_branch_name], stderr=subprocess.STDOUT)
.strip()
.decode("utf-8")
)
return remote_branch_name, commit_hash

Expand Down

0 comments on commit 2329c92

Please sign in to comment.