Open intelfx opened 1 year ago
Hey,
Does this actually work as expected except for the warning, or is it producing incorrect behaviour beyond the warning? I suppose that we can remove the warning, which seems to have come in with this code from #1443.
@bk2204 I believe it sometimes produces incorrect behavior, but I still need to narrow it down.
Specifically: in a private repository cloned via an HTTPS URL, git-lfs operations sometimes try to ask for my HTTPS credentials (despite that the SSH URL should have been substituted instead) whereas regular git operations (fetch or push) never ask for my HTTPS credentials.
I can try to debug this, I was just wondering if I'm relying on "undefined behavior" as far as git-lfs is concerned, or if this is something that you would be open to changing/fixing. The insteadOf precedence order does not seem to be documented.
I think we'd be open to changing this to behave as Git does, provided it has consistent behaviour.
(kind of a follow-up to #4412)
Describe the issue
I have a gitconfig hierarchy that defines multiple insteadOf entries for identical aliases.
I do this to keep a "clean" version of my gitconfig that I check in to my dotfiles, and a "private" gitconfig overlay that I do not check in, that is manually synced to the machines that have my private keys. Here's how it looks:
This appears to work with Git 2.40.1 as I want it to (on machines that only have
~/.gitconfig
, the HTTPS URL is used for GitHub, and on machines that have~/.gitconfig.private
, the SSH URL is used instead). However, Git LFS complains:Could Git LFS be changed to behave in the same way as Git? Or am I relying on "undefined" behavior here?
System environment
OS: up-to-date Arch
Output of
git lfs env