docs: rephrase "Git status looks incorrect" section

This commit is contained in:
Roman Perepelitsa 2023-07-26 19:24:52 +02:00
parent ef401ad02a
commit 9bb15e9ffb

View file

@ -1511,7 +1511,7 @@ Powerlevel10k are released. This may change in the future but not soon.
- [Horrific mess when resizing terminal window](#horrific-mess-when-resizing-terminal-window) - [Horrific mess when resizing terminal window](#horrific-mess-when-resizing-terminal-window)
- [Icons cut off in Konsole](#icons-cut-off-in-konsole) - [Icons cut off in Konsole](#icons-cut-off-in-konsole)
- [Arch Linux logo has a dot in the bottom right corner](#arch-linux-logo-has-a-dot-in-the-bottom-right-corner) - [Arch Linux logo has a dot in the bottom right corner](#arch-linux-logo-has-a-dot-in-the-bottom-right-corner)
- [Git status looks incorrect](#git-status-looks-incorrect) - [Incorrect git status in prompt](#incorrect-git-status-in-prompt)
### Question mark in prompt ### Question mark in prompt
@ -2022,14 +2022,15 @@ Some fonts have this incorrect dotted icon in bold typeface. There are two ways
typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT}' # not bold typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT}' # not bold
``` ```
### Git status looks incorrect ### Incorrect git status in prompt
Powerlevel10k uses [gitstatus](https://github.com/romkatv/gitstatus) to provide a much faster response to traditional `git status`. Powerlevel10k uses [gitstatusd](https://github.com/romkatv/gitstatus) to inspect the state of git
The project relies on the [libgit2](https://github.com/libgit2/libgit2) library however which has some gaps in it's implementation. repositories. The project relies on the [libgit2](https://github.com/libgit2/libgit2) library, which
has some gaps in its implementation. Under some conditions, this may result in discrepancies between
the real state of a git repository (reflected by `git status`) and what gets shown in the
Powerlevel10k prompt.
#### skipHash not supported Most notably, [libgit2 does not support `skipHash`](https://github.com/libgit2/libgit2/issues/6531).
If you see incorrect git status in prompt, run `git config -l` and check whether `skipHash` is
If your `.git/config` has `skipHash` enabled, then you will likely see an incorrect status prompt as this is not supported enabled. If it is, consider disabling it. Keep in mind that `skipHash` may be implicitly enabled
by libgit2 at the moment. [issue](https://github.com/libgit2/libgit2/issues/6531) when activating ceratin git features, such as `manyFiles`.
Note: `skipHash` can be set by implicitly by other configuration toggles such as `feature.manyFiles`