gitoxide icon indicating copy to clipboard operation
gitoxide copied to clipboard

oxidize nu-shell-plugin-gstat

Open Byron opened this issue 1 year ago • 2 comments

nu-shell-plugin-gstat

  • [x] discover repo
  • [x] git-describe
  • [x] git-status (index diff with working tree)
  • [x] read remote of current branch
  • [ ] ahead/behind information for remote

https://github.com/nushell/nushell

Byron avatar Nov 29 '24 06:11 Byron

Is gix status at the point to be able to do this - I was looking at this but was finding it hard to match between libgit2 flat status iteration (eg git2::Status::INDEX_NEW) and the nested enums in gitoxide (iterator over Result<Item> where Item itself is an enum of two further enums)

KGrewal1 avatar May 24 '25 17:05 KGrewal1

Yes, the status is implemented now, but ahead/behind information isn't yet.

I was looking at this but was finding it hard to match between libgit2 flat status iteration (eg git2::Status::INDEX_NEW) and the nested enums in gitoxide (iterator over Result where Item itself is an enum of two further enums)

That is true, status is now represented by the type system which forces everyone using it to deal with all the nitty and gritty details. This greatly increases the chance to not miss a case when handling it, but certainly is way more intimidating at first.

To me the git2 bitflags were more intimidating though as I would always wonder which flag combinations to check, and what's even possible there, leaving me with a feeling that probably not everything is handled.

Byron avatar May 26 '25 03:05 Byron