Straight.el: Current git commands set a too high version compatibility limit (>= 2.28)

Created on 24 May 2021  路  6Comments  路  Source: raxod502/straight.el

Hello,

According to
https://github.com/raxod502/straight.el/blob/5541697ceee7e7ba937eddebba44f1e8e8af6a4f/straight.el#L2485

and this comment https://github.com/hlissner/doom-emacs/issues/5088#issuecomment-847249596

straight is currently setting a hard limit on the version of git that鈥檚 in the PATH in order to operate. Literally Almost (21.04 has 2.30, sorry for being hyperbolic) no Ubuntu is compatible (>= 2.28), and while I鈥檇 agree that it鈥檚 really a Canonical issue at that point, it cuts off a very large part of potential users :(

compatibility external command feature git

Most helpful comment

I didn鈥檛 think about looking for PPAs, it seems it鈥檚 the easiest way to get going. Personally I don鈥檛 really mind if compatibility options are added or not, it鈥檚 probably code one would not like to maintain; therefore just having the PPA for now would be enough for me. Then again, I鈥痙on鈥檛 use Ubuntu

Thanks for your work on straight either way!

All 6 comments

I'll have to look over our git usage to see what we're using and if we can easily substitute those commands for something backwards compatible.

A solution for Ubuntu users in the mean time is to grab git from the git-core ppa:

https://launchpad.net/~git-core/+archive/ubuntu/ppa

I didn鈥檛 think about looking for PPAs, it seems it鈥檚 the easiest way to get going. Personally I don鈥檛 really mind if compatibility options are added or not, it鈥檚 probably code one would not like to maintain; therefore just having the PPA for now would be enough for me. Then again, I鈥痙on鈥檛 use Ubuntu

Thanks for your work on straight either way!

I suspect that this will be an easy fix. We can't have introduced this dependency too long ago, or _I_ would have noticed already! (I'm running Ubuntu 20.04.)

Git has added a lot of alias options recently to make the commands more intuitive, so I guess going forward we should just double-check to make sure we're not using one of them when adding VC code.

Here's a list of the current git commands and the options we're using:

Sub-command Options
branch -m -r
checkout -B
clean -ffd
clone –branch –depth –no-checkout –no-single-branch –no-tags –origin –single-branch
config –get –file
describe –short –match –abbrev
fetch –depth –no-tags
log –format=%h %s
ls-files –unmerged
merge –abort –ff-only
merge-base –is-ancestor
rebase –abort
remote show –master
reset –hard
rev-parse -q –verify –abbrev-ref –symbolic-full-name –git-dir
show -s –format=%d %h %cs
stash push –include-untracked
stash save –include-untracked
status –short
submodule update –init –recursive

I think most of these look they will work for relatively older versions of git
(The only one I see off the top of my head that I remember being added "recently" was the --no-tags option for git clone, but even that was years ago.)
If anyone notices anything that looks like it forces a high version requirement let me know.

776 has been merged into "develop". I think that should remove the >=2.28 restriction. @gagbo: Testing appreciated if you have time.

Thanks.

I鈥檒l test it tomorrow if I remember, but anyway we鈥檒l know soon enough if there鈥檚 an issue since Henrik removed the check for git version in Doom, so we鈥檇 know from the issue tracker

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fuco1 picture Fuco1  路  3Comments

progfolio picture progfolio  路  3Comments

mclearc picture mclearc  路  4Comments

yqrashawn picture yqrashawn  路  3Comments

raxod502 picture raxod502  路  3Comments