You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run git filter-repo on a repo, I kept getting an Error: need git >= 2.22.0 message, even though I have both git versions 2.37.1 and 2.41.0 installed on my system.
Initially I spent a long time trying to figure out if git-filter-repo was pointing to an old version of git (2.10.0) I had recently uninstalled, or something like that.
After tracking the error message to line 2092 of the Python script, I was able to figure out that prior lines were looking for certain things in the output of git diff-tree -h:
# If we don't have fast-exoprt --reencode, we may also be missing
# diff-tree --combined-all-paths, which is even more important...
p=subproc.Popen('git diff-tree -h'.split(),
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
output=p.stdout.read()
ifb'--combined-all-paths'notinoutput:
# We need a version of git-diff-tree with --combined-all-paths
raiseSystemExit(_("Error: need git >= 2.22.0"))
I ran git diff-tree -h on my repo and found that I get error messages from git itself because something's wrong with my repo.
My point is that the canned error message thrown by git-filter-repo was hiding the real problem (that git itself was throwing errors when trying to operate on my repo) and opaquely telling me things that weren't true (that I had the wrong git version installed). The opaqueness of git-filter-repo's error message misdirected me and caused me to spend way longer than necessary trying to fix the problem. Narrowing the scope of and clarifying the error messages thrown by git-filter-repo would prevent people from going on a wild goose chase and spending hours trying to fix problems that do not actually exist.
The text was updated successfully, but these errors were encountered:
When trying to run
git filter-repo
on a repo, I kept getting anError: need git >= 2.22.0
message, even though I have both git versions 2.37.1 and 2.41.0 installed on my system.Initially I spent a long time trying to figure out if
git-filter-repo
was pointing to an old version of git (2.10.0) I had recently uninstalled, or something like that.After tracking the error message to line 2092 of the Python script, I was able to figure out that prior lines were looking for certain things in the output of
git diff-tree -h
:git-filter-repo/git-filter-repo
Lines 2085 to 2092 in 4bc9022
I ran
git diff-tree -h
on my repo and found that I get error messages from git itself because something's wrong with my repo.My point is that the canned error message thrown by
git-filter-repo
was hiding the real problem (that git itself was throwing errors when trying to operate on my repo) and opaquely telling me things that weren't true (that I had the wrong git version installed). The opaqueness ofgit-filter-repo
's error message misdirected me and caused me to spend way longer than necessary trying to fix the problem. Narrowing the scope of and clarifying the error messages thrown bygit-filter-repo
would prevent people from going on a wild goose chase and spending hours trying to fix problems that do not actually exist.The text was updated successfully, but these errors were encountered: