-
-
Notifications
You must be signed in to change notification settings - Fork 661
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 status for subdirectories that are git repositories #797
Conversation
modified: src/fs/fields.rs
modified: src/output/render/git.rs
modified: src/fs/feature/git.rs
…directories that are git repos (ogham#730) modified: src/options/view.rs modified: src/output/table.rs
modified: src/output/table.rs
modified: src/output/render/git.rs modified: src/output/table.rs
--no-default-features configuration modified: src/fs/feature/mod.rs modified: src/fs/fields.rs
modified: src/fs/feature/git.rs modified: src/fs/feature/mod.rs modified: src/fs/fields.rs modified: src/output/render/git.rs modified: src/output/table.rs
To be honest I don’t really care about this feature so it wasn’t in my priorities, but it looks very small and clean so I think I’d like to merge it. However:
Edit: also, could you fix the small conflict with |
In fact I think it’s a cool feature if it works with git submodules. Do you think you could check that? |
recent trend in the git ecosystem (see - https://github.com/github/renaming) modified: src/output/render/git.rs
Thanks for the feedback @ariasuni The Submodules already get detected as repos in their own right, and as such, their status will be shown as well. |
One option: |
Thanks @YAMLcase, but honestly I prefer to keep it simple and stick to an explicit binary indicator (i.e, either clear or dirty) Do you find it more intuitive @ariasuni? I too was debating about adding a separate flag vs piggybacking
That being said, I’m open to adding it if you think it’s crucial. Otherwise, I’ve fixed the conflicts with |
I'd love to see this merged! |
modified: src/output/render/git.rs
Up to date with upstream again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the branch name, you're showing only short branch names.
It's not uncommon to work with medium to long branch names like fix-for-this-long-feature-name
, I fear the result would be a lot of blank spaces..
Would it be possible to add an option to limit the size of the displayed branch name ? (like 10 or 15 chars max)
modified: src/fs/feature/git.rs
modified: src/fs/feature/git.rs
Thanks @bew, good point! Becomes this: Also fixed the other issue. |
This is awesome! Thank you for making this change. My 2 cents, assuming that git status is used to get branch/status info.
|
Exa uses libgit2 directly (which is slow anyway…)… |
Is there option to change from libgit2 to https://github.com/Byron/gitoxide ? |
It’s not very clear to me if gitoxide has a way to get status info (not even talking about the fact it has to be either a crate, or the output of the gix command for status info has to have a |
What is left on this PR to get addressed before it can be merged? |
…-repos and -—git-repos-no-status The latter skips git status lookup and thereby faster
Thanks for the feedback @arazabishov I’ve just added two dedicated flags for this feature:
Running exa with |
Fixed some minor conflicts, so it's gtg again. |
Closing this, since exa is unmaintained (see #1243), and this has been merged in the active fork eza. Thanks! |
This PR adds an optional
Repo
column, showing git information about repositories located directly under the currently searched path, as requested in #730 and #420.Currently it piggybacks the
—git
flag (and works in conjunction with it)