romkatv / libgit2

A cross-platform, linkable library implementation of Git that you can use in your application.
https://libgit2.org/
Other
7 stars 3 forks source link

Merge from upstream libgit2 #6

Open orgads opened 1 month ago

orgads commented 1 month ago

Is there a reason this fork isn't merged from upstream libgit2?

romkatv commented 1 month ago

It's unlikely I'll ever be making any change in this repo.

orgads commented 1 month ago

Why not? And what about pushing your changes upstream? Is it feasible?

romkatv commented 1 month ago

Why not?

It's work.

And what about pushing your changes upstream? Is it feasible?

Might be feasible. I won't be doing it though.

orgads commented 1 month ago

What will you do with repos that will use sha256 for instance? Or any other features that may affect the existing workflow.

romkatv commented 1 month ago

I most likely will do nothing.

orgads commented 1 month ago

I'm willing to help with merging (in either direction). The question is if you're open for such a PR.

romkatv commented 1 month ago

Sure, if you send a clean PR, I'll merge it.

orgads commented 1 month ago

Oh great :)

I'm on it then.

I got to it because I'm trying to debug why worktree doesn't work on Windows, and when I compiled gitstatus I had many compiler warnings coming from libgit2 :)

romkatv commented 1 month ago

FWIW, my personal advice would be to not use gitstatus. If I manage to muster enough will power for the final contribution to gitstatus/powerlevel10k, that would be getting rid of gitstatusd. Since the time I wrote it, git has been getting faster, so it's not as awfully slow to use git nowadays. The big advantage is that it won't require ongoing maintenance to stay on top of git development.

orgads commented 1 month ago

Interesting. Is it possible to rerun the benchmarks you did back then, and see if upstream git (or libgit2) had closed the gap (especially on Windows, I'm concerned about fs performance and process spawning time on msys...)?

romkatv commented 1 month ago

Must be possible but it's work.

The good thing is that you can try various solutions for yourself and see whether plain git is fast enough for you.

orgads commented 1 month ago

Sure, I'll give it a shot. Thanks for your responsiveness.

orgads commented 1 month ago

Is there a way to switch between gitstatus and "git status" in powerlevel10k?

romkatv commented 1 month ago

There is POWERLEVEL9K_DISABLE_GITSTATUS=true but it incidentally also disables async git status computation. My remark above referencing the final contribution was about removing this coincidence.