tochev/git-vanity

TypoError in raw mode

dueringa opened this issue · 0 comments

Im using CPython for Windows (downloaded from python.org) version 3.6.0.

git-vanity exits with a TypeError on moving the HEAD reference:

with sha1 ...
Using 000000001FB7AA44
================
tree ...
parent ...
parent ...
author ...
committer ...
vanity 000000001FB7AA44

(commit msg)
================


Writing changes to the repository...

Traceback (most recent call last):
  File "c:\Users\me\git-vanity\git_vanity.py", line 398, in <module>
    args.raw)
  File "c:\Users\me\git-vanity\git_vanity.py", line 343, in main
    amend_commit_using_raw(final_object)
  File "c:\Users\me\git-vanity\git_vanity.py", line 286, in amend_commit_using_raw
    subprocess.check_call(['git', 'update-ref', 'HEAD', commit])
  File "C:\Python36-32\lib\subprocess.py", line 286, in check_call
    retcode = call(*popenargs, **kwargs)
  File "C:\Python36-32\lib\subprocess.py", line 267, in call
    with Popen(*popenargs, **kwargs) as p:
  File "C:\Python36-32\lib\subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "C:\Python36-32\lib\subprocess.py", line 964, in _execute_child
    args = list2cmdline(args)
  File "C:\Python36-32\lib\subprocess.py", line 461, in list2cmdline
    needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: a bytes-like object is required, not 'str'

The commit itself was written, so I was able to execute git update-ref HEAD myself.

Note: I edited GS in the header, so my line numbers are +1 from the git version