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

Add support for the new includeIf directive #315

Closed
lilyball opened this issue May 24, 2017 · 14 comments
Closed

Add support for the new includeIf directive #315

lilyball opened this issue May 24, 2017 · 14 comments

Comments

@lilyball
Copy link

lilyball commented May 24, 2017

Git 2.13 added a new feature where your config can have an includeIf.<condition>.path directive that acts like include.path as long as the condition holds. It looks like GitUp doesn't understand this.

@swisspol
Copy link
Contributor

GitUp relies on https://libgit2.github.com/, is it supported there?

@lilyball
Copy link
Author

Probably not. A quick skim doesn't suggest anything like this has been added since Git 2.13 came out. I'll file a ticket on them.

@lilyball
Copy link
Author

Filed as libgit2/libgit2#4246.

@swisspol
Copy link
Contributor

Thanks!

@lilyball
Copy link
Author

lilyball commented Nov 9, 2017

libgit2 just implemented this. I'd love to see a GitUp update that includes this change.

@svdo
Copy link

svdo commented Sep 18, 2019

I'm considering fixing this. Would somebody be able to point me in the right direction? I have never seen this code base before, and neither that of libgit2, so few pointers / suggestions would be very welcome.

@svdo
Copy link

svdo commented Sep 18, 2019

Oops, the git-up/libgit2 fork: "This branch is 73 commits ahead, 2334 commits behind libgit2:master". I don't think I'm going to be able to fix that. I quickly tried to rebase / merge but that gives too many conflicts for me to solve.

@ches
Copy link

ches commented Apr 16, 2021

I would be happy to see this too. A practical use case:

My default user.email is my personal email address for open source contribution, but I use

[includeIf "gitdir:~/src/mycompany/"]
    path = ~/src/mycompany/.gitconfig

to override it with work address on work projects below that path. Currently if I make commits with GitUp on work projects, they will use with my personal address.

@khoan
Copy link

khoan commented Jul 14, 2022

Oops, the git-up/libgit2 fork: "This branch is 73 commits ahead, 2334 commits behind libgit2:master". I don't think I'm going to be able to fix that. I quickly tried to rebase / merge but that gives too many conflicts for me to solve.

Are we able to straight up use https://github.com/libgit2/libgit2, if it already supports the customizations made by the git-up/libgit2 fork? Thanks.

@lucasderraugh
Copy link
Collaborator

@khoan Once #772 is in then we should be set to implement things like this. Unfortunately we haven't resolved all the issues yet.

@lucasderraugh
Copy link
Collaborator

I believe the includeIf directive now should be understood in 1.3.3 (because of the libgit2 bump) which is now on the continuous channel.

I'm going to close out this issue, but if this isn't resolved, please feel free to reopen.

@svdo
Copy link

svdo commented Dec 1, 2022

That's great news @lucasderraugh, thanks!! Does that (libgit2 bump) mean that gitup now also performs code signing, or is that unrelated?

@lucasderraugh
Copy link
Collaborator

@svdo I think code signing is different, and is sort of being worked on here #691. I don't think libgit2 has any plans to implement it on their end.

@svdo
Copy link

svdo commented Dec 1, 2022

I understand, thanks for clarifying!

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

No branches or pull requests

6 participants