This patch handles the detached HEAD case, by using git branch --contains HEAD to get the branch (or a list of possible branches). It also adds a option to specify the branch in case this logic fails. Also there is an option to override the base source url for downloading. While I was at it, I adjusted some checks so that the script will run even if the name of the checkout directory is not $packagename. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos-devel/attachments/20140612/a6ca1cae/attachment-0006.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-handle-detached-branch-case.patch Type: text/x-patch Size: 2916 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos-devel/attachments/20140612/a6ca1cae/attachment-0006.bin>