Command 'git rev-parse HEAD' returned non-zero exit status 128.
rajagasti123 opened this issue · comments
While doing git commit some python files, I am getting this error.
File "C:\Repo\cpv\extern\VerFw\Src\ComponentLineImporter_init_.py", line 28, in
from .Version import version
File "C:\Repo\cpv\extern\VerFw\Src\ComponentLineImporter\Version.py", line 22, in
version = subprocess.check_output('git rev-parse HEAD', cwd=os.path.dirname(os.path.abspath(file))).decode().strip()
File "c:\program files\python36\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "c:\program files\python36\lib\subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'git rev-parse HEAD' returned non-zero exit status 128.
- I checked the path of ComponentLineImporter module, and it seems correct.
ComponentLineImporter.file
'C:\Repo\cpv\extern\VerFw\Src\ComponentLineImporter\init.py' - I checked the git command "git rev-parse HEAD" @ folder C:\Repo\cpv\extern\VerFw\Src\ComponentLineImporter. I get correct result.
$ git rev-parse HEAD
49e494f29290c39ca8af8b4c9357183c59027815
I dont know what's wrong. FYI , I am using just 1 repo no duplicate repos.