Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix git config get (--get is an option) #95

Closed
wants to merge 1 commit into from

Conversation

lordkekz
Copy link
Contributor

I tried converting a local git repo and it failed with the following error:

$ git prole convert
Error:   × `git` failed: exit status: 2
  │ Command failed: `cd /path/to/repo && git config get --null checkout.defaultRemote`
  │ Stderr:
  │   Fehler: Schlüssel enthält keine Sektion: get

To get a config entry, you need to write --get instead of get. With this PR, the error no longer shows up.

@9999years
Copy link
Owner

git config --get is deprecated, what version of Git are you on? I want to add a check so it errors out with too-old versions of Git.

https://git-scm.com/docs/git-config#Documentation/git-config.txt---getltnamegtltvalue-patterngt

@lordkekz
Copy link
Contributor Author

lordkekz commented Oct 25, 2024

Oh, you're right. I'm still on NixOS 24.05 and I guess they must've deprecated it since then. But I totally agree with the change, --get was weird.

Sorry for wasting your time 🙃

Edit: looked it up, git config get was added in git 2.46.0 according to the git docs. NixOS 24.05 still has git 2.44 btw.

@lordkekz lordkekz closed this Oct 25, 2024
@9999years
Copy link
Owner

Thanks; 2.46 is probably more recent than I should require. I should check the test suite on older versions...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants