[GH-ISSUE #376] Git config native implementation #141

Closed
opened 2026-03-02 04:12:11 +03:00 by kerem · 9 comments
Owner

Originally created by @svarlamov on GitHub (Jan 18, 2026).
Original GitHub issue: https://github.com/git-ai-project/git-ai/issues/376

Originally assigned to: @bernoussama on GitHub.

Instead of calling git config to get config values every time (adds 10-40ms of overhead for each call, which can really add up), build or find a rust native implementation.

This has positive performance implications for git-ai overall, and enables us to build features like the one we didn't merge in #68 for git aliased commands that are currently not being handled correctly by git-ai

Originally created by @svarlamov on GitHub (Jan 18, 2026). Original GitHub issue: https://github.com/git-ai-project/git-ai/issues/376 Originally assigned to: @bernoussama on GitHub. Instead of calling `git config` to get config values every time (adds 10-40ms of overhead for each call, which can _really_ add up), build or find a rust native implementation. This has positive performance implications for git-ai overall, and enables us to build features like the one we didn't merge in #68 for git aliased commands that are currently not being handled correctly by git-ai
kerem 2026-03-02 04:12:11 +03:00
Author
Owner

@svarlamov commented on GitHub (Jan 19, 2026):

https://github.com/GitoxideLabs/gitoxide/tree/main/gix-config

<!-- gh-comment-id:3768642612 --> @svarlamov commented on GitHub (Jan 19, 2026): https://github.com/GitoxideLabs/gitoxide/tree/main/gix-config
Author
Owner

@bernoussama commented on GitHub (Jan 26, 2026):

Can I work on this issue?

<!-- gh-comment-id:3800544849 --> @bernoussama commented on GitHub (Jan 26, 2026): Can I work on this issue?
Author
Owner

@svarlamov commented on GitHub (Jan 26, 2026):

Hey @bernoussama! Thank you so much for offering -- would love to have you contribute! How are you thinking about the implementation?

<!-- gh-comment-id:3800881174 --> @svarlamov commented on GitHub (Jan 26, 2026): Hey @bernoussama! Thank you so much for offering -- would love to have you contribute! How are you thinking about the implementation?
Author
Owner

@bernoussama commented on GitHub (Jan 26, 2026):

From my initial look over the repo, i see it's used in 3 functions in repository.rs, so i'll essentially have to swap git command invocation with gix-config, most importantly keeping the functions signatures, while changing the GitCliError with a new Error variant something like GixError for example, and also add some tests to ensure same behavior.
However, i'm yet to clone the repo and go more in depth.

<!-- gh-comment-id:3801573020 --> @bernoussama commented on GitHub (Jan 26, 2026): From my initial look over the repo, i see it's used in 3 functions in repository.rs, so i'll essentially have to swap git command invocation with gix-config, most importantly keeping the functions signatures, while changing the GitCliError with a new Error variant something like GixError for example, and also add some tests to ensure same behavior. However, i'm yet to clone the repo and go more in depth.
Author
Owner

@svarlamov commented on GitHub (Jan 26, 2026):

Hey @bernoussama, that sounds good! I'm excited to hear how the gix integration goes. Good thinking on adding the error type -- I'm not sure how much code you have to touch to get that to work, but if it's not too much that sounds great to be able to more easily distinguish error sources. I've assigned this issue to you. Excited for the PR soon and please feel free to reach out if you have any questions in the meantime!

<!-- gh-comment-id:3801700338 --> @svarlamov commented on GitHub (Jan 26, 2026): Hey @bernoussama, that sounds good! I'm excited to hear how the gix integration goes. Good thinking on adding the error type -- I'm not sure how much code you have to touch to get that to work, but if it's not too much that sounds great to be able to more easily distinguish error sources. I've assigned this issue to you. Excited for the PR soon and please feel free to reach out if you have any questions in the meantime!
Author
Owner

@bernoussama commented on GitHub (Jan 26, 2026):

Hey @svarlamov , thanks, will do!

<!-- gh-comment-id:3801952890 --> @bernoussama commented on GitHub (Jan 26, 2026): Hey @svarlamov , thanks, will do!
Author
Owner

@bernoussama commented on GitHub (Jan 27, 2026):

Hey @svarlamov , i have question about config_set_str a function that also invokes git config command, haven't modify it since it's unused(it's not referenced anywhere in the repo), is it planned to be used later? Or should it be removed?

<!-- gh-comment-id:3804243824 --> @bernoussama commented on GitHub (Jan 27, 2026): Hey @svarlamov , i have question about `config_set_str` a function that also invokes `git config` command, haven't modify it since it's unused(it's not referenced anywhere in the repo), is it planned to be used later? Or should it be removed?
Author
Owner

@svarlamov commented on GitHub (Jan 27, 2026):

That's a great point -- left some comments in the PR. I think we can just remove this function for now since we don't have a need to update git config as far as I can tell.

<!-- gh-comment-id:3806203833 --> @svarlamov commented on GitHub (Jan 27, 2026): That's a great point -- left some comments in the PR. I think we can just remove this function for now since we don't have a need to update git config as far as I can tell.
Author
Owner

@bernoussama commented on GitHub (Jan 27, 2026):

Okay, will remove it then

<!-- gh-comment-id:3806637438 --> @bernoussama commented on GitHub (Jan 27, 2026): Okay, will remove it then
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#141
No description provided.