Skip to content

Commit

Permalink
[tsmeta/layers] Filter current git branch better.
Browse files Browse the repository at this point in the history
  • Loading branch information
mochel-timesys committed Mar 10, 2020
1 parent b9a13ce commit d33fcaf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes/tsmeta.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,9 @@ def tsmeta_git_branch_info(d, path):
'2'
])
_name = _run_git(_git_branch_cmd, [_points_at, _color, _pipeline])
if _name == "(no branch)":
if any([
_str in _name for _str in [ '(no branch)', '(HEAD detached' ]
]):
_name = "detached"
bb.debug(2, "Path: %s, Branch Name: %s" %(path, _name))
return _name
Expand Down

0 comments on commit d33fcaf

Please sign in to comment.