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
🐛 Delta does not respect git -c #493
Comments
Hi @wyuenho, agreed, I'd like to make this work, let's figure out how. So, I had personally thought that it wasn't really possible, but I think I'm wrong (see below). First, here's how I thought it worked:
HOWEVER...
my $cmd = "git config --list";
my @out = `$cmd`; So the question that I do not yet know the answer to is: how is it that the child process learns of config modifications made by Here's an experiment that doesn't involve [core]
pager = git --no-pager config --list > /tmp/seen-by-pager.gitconfig If I run So, how does this work? I think I need to know that in order to fix this. I checked |
OK, a bit more experimenting showed the answer. It seemed like the only sane way for the parent git process to inform its grandchild git process (child of diff-so-fancy) about the So the solution to this ticket would be either
|
|
When git is invoked as `git -c aaa.bbb=ccc -c ddd.eee=fff` then git sets the env var GIT_CONFIG_PARAMETERS containing the changed config entries, so that child processes can honor them. libgit2 doesn't yet honor the env var: see libgit2/libgit2#3854. Fixes #493 Fixes #307 Ref dandavison/magit-delta#13
When git is invoked as `git -c aaa.bbb=ccc -c ddd.eee=fff` then git sets the env var GIT_CONFIG_PARAMETERS containing the changed config entries, so that child processes can honor them. libgit2 doesn't yet honor the env var: see libgit2/libgit2#3854. Fixes #493 Fixes #307 Ref dandavison/magit-delta#13
When git is invoked as `git -c aaa.bbb=ccc -c ddd.eee=fff` then git sets the env var GIT_CONFIG_PARAMETERS containing the changed config entries, so that child processes can honor them. libgit2 doesn't yet honor the env var: see libgit2/libgit2#3854. Fixes #493 Fixes #307 Ref dandavison/magit-delta#13
When git is invoked as `git -c aaa.bbb=ccc -c ddd.eee=fff` then git sets the env var GIT_CONFIG_PARAMETERS containing the changed config entries, so that child processes can honor them. libgit2 doesn't yet honor the env var: see libgit2/libgit2#3854. Fixes #493 Fixes #307 Ref dandavison/magit-delta#13
Thanks @wyuenho, I think this will be a big improvement to configuration on the fly. Now all we need is shell completion over delta options :) |
Is this in version 0.7.1? With
and still getting a side-by-side view. Also, question. With config like:
Is the intent that you can say |
Hi @kbd, you're right that this is a bit confusing. Essentially there are two to activate a "built-in feature" such as
Furthermore, trying to disable something that is activated by inclusion in the
Not [delta]
features = line-numbers decorations
side-by-side = true
[delta "inline"]
side-by-side = false
plus-style = red red In summary, there is more work to be done on straightening out the semantics and fixing bugs, but it is usually possible to achieve whatever you want with a little experimentation. I know this has been noted a few times. Let's use #446 for this; that is closely related. |
This does not seem to be the case in delta 0.7.1.
Still shows side-by-side view. I can't get a version of the disable feature trick to work either.
|
Hi @jacobmischka, you're right, and I noticed this also when I upgraded my git version. It's due to a change introduced in git v2.31.0 (am I right that you have git >= 2.31.0?) I've updated delta to accomodate the upstream changes in git in #573, which will be in the next release. If you're able to build from master then it has that fix. |
Great, thank you! |
If I have the following in git's global
.gitconfig
:When I issue the following git command:
I still get a side by side view.
git -c
should always override the config file.The text was updated successfully, but these errors were encountered: