Skip to content
Snippets Groups Projects
Commit c4b37a06bf9b authored by Yaroslav Halchenko's avatar Yaroslav Halchenko
Browse files

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 140a8b8f25b7
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment