Skip to content
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

Warm when git feature is disabled instead of ignoring flags #762

Merged
merged 3 commits into from
Mar 29, 2021

Conversation

ariasuni
Copy link
Collaborator

@ariasuni ariasuni commented Dec 3, 2020

The flags --git and --git-ignore are caught early during options parsing, so no more checking for git feature is done elsewhere.

Since --git-ignore depends on git too since recently, remove it from help when git feature is disabled.

Extended attributes now don’t artificially depends on git feature being enabled.

Tell if exa was compiled with git support or not when using --help

Tell in the man that some flags needs exa built with git support

Fix #761

The flags --git and --git-ignore are caught early during options parsing, so no more checking for git feature is done elsewhere.

Since --git-ignore depends on git too since recently, remove it from help when git feature is disabled.

Extended attributes now don’t artificially depends on git feature being enabled.
@ariasuni ariasuni force-pushed the warm-when-git-feature-is-disabled branch 2 times, most recently from 9f803b3 to 887b49e Compare December 10, 2020 18:28
@ariasuni ariasuni force-pushed the warm-when-git-feature-is-disabled branch 2 times, most recently from 887b49e to a98970a Compare December 10, 2020 18:29
@ariasuni
Copy link
Collaborator Author

I realize that the way this is done is not ideal at all.

Aborting with an error when git is disabled may prevent sharing alias using git-related features between different machines, so I guess it should be ignored. But then if it’s ignored, we need to take any other occasion to explain the user what’s going on. This is why I believe that instead of --help not displaying anything about --git and --git-ignore, which may confuse users who know about the git options, it should tell user explicitly that these options exist but are unavailable.

These thoughts are related to the fact that some distributor may not enable git, like it was done for Debian/Ubuntu.

@ogham
Copy link
Owner

ogham commented Mar 29, 2021

Thanks for this!

This is why I believe that instead of --help not displaying anything about --git and --git-ignore, which may confuse users who know about the git options, it should tell user explicitly that these options exist but are unavailable.

Yeah, this was a big downside of omitting them from the --help output. It's not an unknown argument, it's a known one, just a disabled one. The new message is much better.

Aborting with an error when git is disabled may prevent sharing alias using git-related features between different machines, so I guess it should be ignored. But then if it’s ignored, we need to take any other occasion to explain the user what’s going on.

I think if exa started printing out warnings (Warning: exa was built without Git support; ignoring --git option) upon startup, users would want to fix their aliases anyway, because the warnings would get annoying.

@ogham ogham merged commit e6edb88 into ogham:master Mar 29, 2021
@ariasuni ariasuni deleted the warm-when-git-feature-is-disabled branch March 29, 2021 23:12
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.

--git switch not working on Debian-based systems
2 participants