Commit 751f9839 authored by Yaroslav Halchenko's avatar Yaroslav Halchenko

BF: replace show-ref with rev-parse --verify for determining current commit

git show-ref -s HEAD  has shown to not work in all scenarios
and git rev-parse --help provides this as an ultimate example:

         ·   Print the object name of the current commit:

               $ git rev-parse --verify HEAD
parent c0bc7e85
...@@ -27,7 +27,7 @@ class sdist(sdist_orig): ...@@ -27,7 +27,7 @@ class sdist(sdist_orig):
self.force_manifest = 1 self.force_manifest = 1
if (sys.platform != "win32" and if (sys.platform != "win32" and
os.path.isdir('.git')): os.path.isdir('.git')):
assert os.system("git show-ref -s HEAD > .gitrev") == 0 assert os.system("git rev-parse --verify HEAD > .gitrev") == 0
sdist_orig.run(self) sdist_orig.run(self)
add_command_class('sdist', sdist) add_command_class('sdist', sdist)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment