| Age | Commit message (Collapse) | Author |
|
Closes #12538
|
|
|
|
We removed this mitigation in 0c80a063 because of an assumption
that the issue had been fixed, but it looks like zsh < 5.0.6 has
other issues (see #12360), so we need to disable it for real.
Fixes #12360
|
|
Fixes #12331
|
|
See https://github.com/ohmyzsh/ohmyzsh/issues/12331#issuecomment-2059460268
|
|
RPS1 and RPROMPT are not equivalent, though they have the same effect.
Added both to detect if `git_prompt_*` is used.
Fixes #12325
|
|
Fixes #12321
|
|
This is important for themes using it, since it is usually a little slower than git_prompt_info.
Also two small fixes :
- the handler for git_prompt_info was incorrectly named _omz_git_prompt_status
- _defer_async_git_register was kept in precmd, there is no need to call it on each prompt
|
|
BREAKING CHANGE: the new async prompt feature will render prompt information
asyncronously and degrade nicely when the calls take too long to finish, as
the prompt will already be first drawn and interactive. This is
enabled by default for the git prompt and themes that use it (`git_prompt_info`).
If you find that it's not working for you, please open an issue if one is
not already opened, and see https://github.com/ohmyzsh/ohmyzsh#disable-async-git-prompt
for how to turn it off.
|
|
This fix conditionally registers the git prompt async handler only
if `git_prompt_info` is used anywhere in the prompt variables.
This is done in the proper order, so that the async request is
processed once the handler has been registered.
This fix also passes the return value of the previous command
to each of the async handlers, in case they are needed.
|
|
|
|
BREAKING CHANGE: the `git_prompt_info` prompt function has been
reworked by default to use the new async prompt feature. If you're
experiencing issues see #12257.
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
|
|
Co-authored-by: Marc Cornellà <hello@mcornella.com>
|
|
`parse_git_dirty`" (#10927)
|
|
|
|
|
|
|
|
Co-authored-by: Marc Cornellà <hello@mcornella.com>
|
|
|
|
Closes #6391
Co-authored-by: Sergey Mashkov <cy6erGn0m@gmail.com>
|
|
In the output of `git status -sb`, 'MM' indicates there are both added and modified changes.
This change marks that case as MODIFIED instead of ADDED.
|
|
BREAKING CHANGE: the git config option to skip running `git_prompt_info` has changed from `oh-my-zsh.hide-status` to `oh-my-zsh.hide-info` (#9188).
|
|
Show the remote branch the local branch is tracking if `ZSH_THEME_GIT_SHOW_UPSTREAM`
is set, like so: `ZSH_THEME_GIT_SHOW_UPSTREAM=1`.
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
|
|
Fixes #9326
|
|
- Fix 'STASHED' key and unsupported syntax in 5.0.2
- Optimise `if` statement to make it more idiomatic.
|
|
|
|
Closes #4912
Closes #5137
Closes #8071
|
|
|
|
DISABLE_UNTRACKED_FILES_DIRTY, DISABLE_AUTO_TITLE, GIT_STATUS_IGNORE_SUBMODULES are not set
Handle these variables not being set with conditional access.
If the user has set -u option to report attempts to use undeclared / unassigned variable, accessing the variables needs to be conditional.
|
|
Closes #4989
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
|
|
|
|
|
|
$GIT_STATUS_IGNORE_SUBMODULES can be used to specify handling of
submodules. It can be:
not set : ignore dirty submodules (this was default zsh behavior)
"git" : do not use "--ignore-submodules" and let git choose,
this obeys setting in .gitmodules
other : comes into "--ignore-submodules=$GIT_STATUS_IGNORE_SUBMODULES"
|
|
The 1.7.2 release was published in July 2010 [1]. It's about time to stop
supporting older versions.
Fixes #4583
[1] https://github.com/git/git/releases/tag/v1.7.2
|
|
Fixes #7118
|
|
If @{u} is not defined, git rev-list will give an error; redirect
to stderr the error and deal with this case in what follows.
|
|
git_prompt_status (#3632)
|
|
declared so. This fix avoids the dreaded "parse_git_dirty:3: FLAGS: attempt to assign array value to non-array". (#6414)
|
|
(#5388)
|
|
This fixes old git_commits_ahead behavior and changes git_commits_behind
to have the same behavior.
Fixes #5355
|
|
* Function wasn't returning correct value
* Updated underlying git command
* Kept echo command from previous function for backwards compatibility
* Kept function consistent with git_commits_behind
|
|
* Added git_commits_behind function
* Added 'command' to git_commits_behind function
* git_commits_behind code review changes
|
|
|
|
Re-added $ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE variable which was removed in 9f55213
|
|
In places, the local statement will override the exit code and the written
command won't have the effect intended when it was written.
For example, when it's not inside a git repo the exit code won't be true,
but the local statement will make it true regardless. See #4708.
|
|
Fixes #4085: core -> plugin dependency issue.
Rename it to git_current_branch for clarity that it's git-specific.
Update all plugins that were calling it to use new name.
Fix variable leaks by making more variables in lib/git.zsh local.
Have lib/git.zsh use [[ ]] instead of [ ] everywhere.
|
|
|
|
Uniform git prompt equal remote to all others prompts, setting the correct symbol
(if applicable) to $git_remote_status, instead of echoing it.
It also solves the problem pointed out in #3911
|
|
ahead and diverged remote, I added ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE.
|
|
This adds two new theme functions for git:
* `git_prompt_behind` works in a identical fashion to `git_prompt_ahead`
and will output a format variable (`ZSH_THEME_GIT_PROMPT_BEHIND`) if
the branch is behind.
* `git_prompt_remote` will output one format variable if the branch
exists on remote (`ZSH_THEME_GIT_PROMPT_REMOTE_EXISTS`), and another
if the branch is unpublished (`ZSH_THEME_GIT_PROMPT_REMOTE_MISSING`).
The old `git_prompt_ahead` has been changed. Using git log is subject
to formatting in .gitconfig, which can be overridden and will break
this function. Relying on rev-list is much more stable.
|