marmelab / greenframe-cli

Estimate the carbon footprint of a user scenario on a web application
https://greenframe.io
Other
235 stars 12 forks source link

Change getBranchName function to match with orphan checkouts #57

Closed JulienMattiussi closed 1 year ago

JulienMattiussi commented 1 year ago

Trello card #677

The previous command git rev-parse --abbrev-ref HEAD can't give the name of a branch when it's an orphan. It always give HEAD instead

With the new command, we always get the real branch name git branch --show-current

image