A common development practise at our company is to use namespaced git branches, e.g.

wiifm/feature-x
release/2014-09-29

The current code only takes the last fragment of the branch, this is not idea. The attached patch resolves this by trimming from the front.

CommentFileSizeAuthor
environment_indicator-git.patch635 byteswiifm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jweowu’s picture

Status: Needs review » Reviewed & tested by the community

This looks sensible to me.

I doubt there's any chance of 'refs/' occurring in the path, as the man page says the --all argument to git describe means "use any ref found in refs/ namespace".

git describe automatically strips any 'tags/' prefix, as tags are its default output.

So I think that 'heads/' really is the only prefix which needs dealing with. Or at least if something else did crop up, we'd probably prefer to see what it was.

bdone’s picture

+1 for this as RTBC.

e0ipso’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

Version for D7 is unmaintained. I am sorry for the inconvenience.