git-absorb icon indicating copy to clipboard operation
git-absorb copied to clipboard

absorb does't take `includeIf` gitconfig into account

Open skoch13 opened this issue 10 months ago • 4 comments

I have a respective includeIf directive in my gitconfig which changes user (name, email) for repos in the configured directory. While executing git config user.email returns the proper result, absorb tries to use the default global user (and asks to force the commit creation as it's being unable to find my commits).

skoch13 avatar Apr 15 '24 10:04 skoch13

this is almost certainly some kind of upstream issue. do you have a complete gitconfig example you can share that reproduces?

tummychow avatar Apr 15 '24 13:04 tummychow

Sure,

[user]
 name = Sergey Kochetkov
 email = skoch13@***
 login = skoch13
[includeIf "hasconfig:remote.*.url:*://%URI%/**"]
  path = .gitconfig-override
#.gitconfig-override
[user]
 email = [email protected]

1 - default git user 2 - user override

Screenshot 2024-04-15 at 16 24 18

skoch13 avatar Apr 15 '24 14:04 skoch13

yup: https://github.com/libgit2/libgit2/issues/6641

you might be better served putting those overrides in the repository-level git config if it's important

tummychow avatar Apr 15 '24 14:04 tummychow

that's a bummer. thank you

skoch13 avatar Apr 15 '24 14:04 skoch13