Skip to content

Gitoxide integration#174

Open
philocalyst wants to merge 8 commits intocococonscious:mainfrom
philocalyst:gix2
Open

Gitoxide integration#174
philocalyst wants to merge 8 commits intocococonscious:mainfrom
philocalyst:gix2

Conversation

@philocalyst
Copy link

Had to scrap due to poor git usage

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/lib/commit.rs 100.00% <ø> (ø)
src/lib/questions.rs 97.94% <100.00%> (+0.76%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Owner

@cococonscious cococonscious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the open comments, they're mostly the same as in #162 .
Also, please update/rebase your branch.

if !scopes.contains(&scope) {
scopes.push(scope);
}
// Iterate through commits
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments in this file are a bit redundant.

temp_dir: &std::path::Path,
message: &'static str,
) -> Result<(), Box<dyn Error>> {
Command::new("git")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try to do this programatically (like before with git2) instead of running a command?

Cargo.toml Outdated

[features]
vendored-openssl = ["git2/vendored-openssl"]
vendored-openssl = []
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove this feature now since there's no dependencies in it anymore. Does this change mean that openssl isn't a requirement for koji anymore?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, could you please not include the default features for gitoxide and only use those that are actually used in koji? See https://docs.rs/gix/latest/gix/#library-developers

Copy link
Author

@philocalyst philocalyst Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the dependency, but respectfully dead code elimination handles most of the incurred bloat — I'm not particularly interested in the complexities of gix's flags; and don't believe this is blocking.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that explicitly defining the required features, instead of relying on DCE, would improve build times, is this assumption not correct?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumption is correct; just again, I believe the priority should be merging this long-standing issue; my expertise isn't in the particularities of Gix flags.

@philocalyst
Copy link
Author

and unfortunately gix is too low level for some of those functions to not shell out to git; probably in a year or so the gix team will have implemented their high-level wrappers but otherwise we'd be hosting a huge amount of code to just avoid running something that is 1:1 with the use-case (koji is for git commits)

@cococonscious
Copy link
Owner

and unfortunately gix is too low level for some of those functions to not shell out to git; probably in a year or so the gix team will have implemented their high-level wrappers but otherwise we'd be hosting a huge amount of code to just avoid running something that is 1:1 with the use-case (koji is for git commits)

I honestly fail to see the advantage of moving to gix if we're not implementing the commits ourselves, which would also allow us to move away from cocogitto as well. Moving from a library implementation to wrapping commands feels like a step backwards, e.g. cocogitto is also 1:1 with the usecase of creating commits and they also implement commits programmatically: https://github.com/cocogitto/cocogitto/blob/main/src/git/commit.rs

This is a blocking matter for me.

@philocalyst
Copy link
Author

philocalyst commented Feb 5, 2026

Then I'm misunderstanding -- I thought those git functions were isolated to the tests/integration; Certainly worthwhile in core. Let me dig back in.

@philocalyst
Copy link
Author

philocalyst commented Feb 6, 2026 via email

@cococonscious
Copy link
Owner

Then I'm misunderstanding -- I thought those git functions were isolated to the tests/integration; Certainly worthwhile in core. Let me dig back in.

You're not necessarily misunderstanding, it's just that I want to replace cocogitto, which koji is using to create commits at the moment, with our own implementation at some point, which is why it'd be great to have the basis for it it here already.

@philocalyst
Copy link
Author

philocalyst commented Feb 6, 2026 via email

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants