git-utils.sh: git_local_branch failes when using newer git
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Triaged
|
Low
|
Scott Little |
Bug Description
Brief Description
-----------------
git_local_branch is supposed to return the local branch name for a directory.
With newer versions of git, it sometimes gets confused and returning a tag name
instead.
Severity
--------
Minor
Steps to Reproduce
------------------
cd .repo/manifest
source git-utils.sh
git_local_branch $PWD
Expected Behavior
------------------
Returns the local branch name.
e.g. 'default' in the above scenario.
Actual Behavior
----------------
Sometimes it returns a tag instead, with a '~1' postfix.
I think git is now trying to say we are 'n' commits removed from the tag.
n=1 in this example.
This type of return value confuses the script that otherwise tries to filter out tags.
Reproducibility
---------------
Intermittent. Seems to depend on the version of git in use
System Configuration
-------
N/A
Branch/Pull Time/Commit
-------
N/A
Last Pass
---------
N/A
Timestamp/Logs
--------------
N/A
Test Activity
-------------
Build
Workaround
----------
N/A
Changed in starlingx: | |
assignee: | nobody → Scott Little (slittle1) |
Marking as low severity as indicated by the reporter