git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elijah Newren <newren@gmail.com>
To: "Kerry, Richard" <richard.kerry@atos.net>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git-filter-repo For Windows (possibly a request for a bash for Windows primer)
Date: Mon, 20 Apr 2020 09:53:37 -0700	[thread overview]
Message-ID: <CABPp-BGis7wswAjwgTa84m-TsQznrQWQJVJZW0_MyN9ieFMzeA@mail.gmail.com> (raw)
In-Reply-To: <AM0PR02MB371559B3C5445A3C9D39821B9CD40@AM0PR02MB3715.eurprd02.prod.outlook.com>

On Mon, Apr 20, 2020 at 8:11 AM Kerry, Richard <richard.kerry@atos.net> wrote:
>
>
> This follows my earlier query for which the answer was "use git-filter-repo".
> I've cloned git-filter-repo from GitHub, and I've installed the latest Python (version 3.8).  I'm working on Windows.  Windows 10 if it makes any difference, so git is Git For Windows.
> The first instruction for git-filter-repo is to copy it into the "--exec-path" of git.  That fails, saying Access is Denied.  So leaving aside the option to change the permissions I've followed the second half of the sentence and added my git-filter-repo location to my Path (or PATH if it's in bash).  Now running "get filter-repo" gives:
> /usr/bin/env: 'python3.exe': No such file or directory
>
> My python executable is called python3.exe.  There is a note in the git-filter-repo project about certain Windows installations where it isn't called python3, but that now raises in my mind the question of whether I need to tweak git-filter-repo to look for "python3.exe" rather than just "python3".  Or can I take it that the Windows version of bash understands that it needs to add ".exe" automatically?
>
> Assuming that is handled automatically, what do I now need to do to satisfy the error message?  Do I need to put something in bash-for-Windows' /usr/bin/env directory?  Or is there something else entirely that I should be doing?
>
> And is it OK to ask about this on this list, or should I be going to a git-filter-branch resource?  Or for Git For Windows?
>
> Regards,
> Richard.

Emailing this list is fine.  You can also open an issue on GitHub for
the project if you prefer; I respond in both places.  I may have
limited ability to help with Windows issues since I don't have a
Windows system to use or test on, though I have succeeded in fixing a
few Windows bugs based on reporter feedback. (So maybe this list is
better because more people can chime in with Windows experience?)
I've got at least a dozen or so reports of people using it
successfully on Windows so someone has figured it out.  I'll try to
provide a few pointers that might help.

You don't have to use "#!/usr/bin/env python3" or "#!/usr/bin/env
python".  I could have put "#!/usr/bin/python3" there, but that might
make it specific to my system.  I figured other systems installed
python3 somewhere other than /usr/bin/, but that /usr/bin/env should
be somewhat common and should find the python installation.  If
/usr/bin/env doesn't happen to exist on your system, though, it is
perfectly fine to have "#!/System/Commands/python3" or whatever is
needed.

If installation is difficult, you could consider using a package
manager.  In particular, the scoop package manager, built for Windows,
was one of the first out there to package git-filter-repo -- it was
even ahead of most the linux package managers.  (And, yes, scoop can
also be used to install python3 as far as I understand.)  I haven't
used it myself (because I don't have a Windows system as I mentioned
before), but since they were so interested in packaging
git-filter-repo and making "scoop install git-filter-repo" part of the
instructions (https://github.com/newren/git-filter-repo/issues/20),
they look like a friendly bunch that are willing to help.

I also looked through the issues and PRs related to Windows, and
thought that the following links particularly had interesting comments
that might be useful to someone running on Windows:
  * https://github.com/newren/git-filter-repo/issues/36
  * https://github.com/newren/git-filter-repo/pull/10
  * https://github.com/newren/git-filter-repo/issues/48
I don't know if any of them will solve your particular problem, but
they seemed more likely to be of interest or use than most.  Also,
I'll repeat the link for search for reports of Windows issues with
git-filter-repo in case I missed one that might be useful to you:
  * https://github.com/newren/git-filter-repo/issues?q=is%3Aissue+windows

Anyway, I hope at least one of those pointers is useful to you.

Elijah

  reply	other threads:[~2020-04-20 16:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 14:03 git-filter-repo For Windows (possibly a request for a bash for Windows primer) Kerry, Richard
2020-04-20 16:53 ` Elijah Newren [this message]
2020-04-20 17:24   ` Elijah Newren
2020-04-20 18:46     ` Philip Oakley
2020-04-21 14:52       ` Kerry, Richard
2020-04-25 14:15         ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABPp-BGis7wswAjwgTa84m-TsQznrQWQJVJZW0_MyN9ieFMzeA@mail.gmail.com \
    --to=newren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=richard.kerry@atos.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).