Giter VIP home page Giter VIP logo

Comments (10)

newren avatar newren commented on July 23, 2024

Thanks for the report! I suspected something like this and asked in issue #4 but never got an answer. Could you run the following and report if you get the same error:

subprocess.check_output(["git", b"--version"])

If so, I can extend the wrappers to not only unicode-ify the cwd argument, but also the args list.

from git-filter-repo.

justdan96 avatar justdan96 commented on July 23, 2024

from git-filter-repo.

newren avatar newren commented on July 23, 2024

Yes, you should be able to try that out at a vanilla python prompt, though you'll need to first run import subprocess within the python prompt to make sure it has the 'subprocess' module loaded.

from git-filter-repo.

newren avatar newren commented on July 23, 2024

Have you had a chance to take a look?

from git-filter-repo.

justdan96 avatar justdan96 commented on July 23, 2024

Please find output below:

>>> import subprocess

>>> subprocess.check_output(["git", b"--version"])

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "E:\python37\lib\subprocess.py", line 395, in check_output

    **kwargs).stdout

  File "E:\python37\lib\subprocess.py", line 472, in run

    with Popen(*popenargs, **kwargs) as process:

  File "E:\python37\lib\subprocess.py", line 775, in __init__

    restore_signals, start_new_session)

  File "E:\python37\lib\subprocess.py", line 1119, in _execute_child

    args = list2cmdline(args)

  File "E:\python37\lib\subprocess.py", line 530, in list2cmdline

    needquote = (" " in arg) or ("\t" in arg) or not arg

TypeError: a bytes-like object is required, not 'str'

from git-filter-repo.

newren avatar newren commented on July 23, 2024

Wow, kinda lame that this isn't an intrinsic windows issue, but Python itself just assumes everything is a (unicode) string. Anyway, I think my workaround in the windows-workarounds branch should fix this. Could you give it a try?

from git-filter-repo.

justdan96 avatar justdan96 commented on July 23, 2024

I'll give it a try tomorrow, will let you know

from git-filter-repo.

justdan96 avatar justdan96 commented on July 23, 2024

It appears to be working now. I successfully issued a mailmap command.

I received an error upon doing a git push to do with restrictions on only being able to push my own commits but I'm not sure that is something that could be fixed in this program, it appears to be an issue with our git server.

from git-filter-repo.

justdan96 avatar justdan96 commented on July 23, 2024

Also just FYI it looks like PyInstaller can create a Windows executable just fine for git-filter-repo.

Also if you need Windows test coverage maybe Github Actions could help?

from git-filter-repo.

newren avatar newren commented on July 23, 2024

Cool, thanks for testing it out. I've merged the change into the master branch. As far as push restrictions, yeah if you have some kind of aggressive hooks on the server that only let you push your own commits up, then that wouldn't work well with filter-repo since it edits all the commits in the repo creating new ones (and then deletes the old ones). If this is gerrit you are using, https://gerrit-review.googlesource.com/Documentation/access-control.html#category_forge_author (and forge committer right after it) may help, but it's going to be entirely dependent on the git server you're using.

Thanks for the heads up on PyInstaller; I may look into it at some point. Or I may delay until someone else does it for me. :-)

from git-filter-repo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.