Skip to content

Commit

Permalink
kernelci/build.py: fix git_branch_tip
Browse files Browse the repository at this point in the history
Bug: `tip_of_branch` is always set to `False`.
Fix the method by stripping subprocess command
output to get the correct value for `tip_of_branch`.

Signed-off-by: Jeny Sadadia <[email protected]>
  • Loading branch information
Jeny Sadadia authored and nuclearcat committed Nov 5, 2024
1 parent 260c53a commit 8549d0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernelci/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def git_branch_tip(path, commit, tree, branch):
git rev-parse {tree}/{branch}
""".format(path=path, tree=tree, branch=branch)
head_commit_id = shell_cmd(cmd)
if commit == head_commit_id:
if commit.strip() == head_commit_id.strip():
return True
return False

Expand Down

0 comments on commit 8549d0e

Please sign in to comment.