summaryrefslogtreecommitdiff
path: root/lib/git.zsh
AgeCommit message (Collapse)Author
2016-09-08Fix git_prompt_status() not showing ahead/behind/diverged status correctly ↵Yuichi Tanikawa
(#5388)
2016-09-05git: output nothing when no commits ahead or behindMarc Cornellà
This fixes old git_commits_ahead behavior and changes git_commits_behind to have the same behavior. Fixes #5355
2016-08-01Updated git_commits_ahead function (#5247)Steven
* 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
2016-07-15lib/git.zsh: Added git_commits_behind function (#4450)Steven
* Added git_commits_behind function * Added 'command' to git_commits_behind function * git_commits_behind code review changes
2016-03-31Add git user profile functions for prompt displayAesop Wolf
2016-01-13Re-added $ZSH_THEME_GIT_PROMPT_EQUAL_REMOTEMichele Bologna
Re-added $ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE variable which was removed in 9f55213
2015-12-17Put `local var` declaration in its own line in lib/git.zshMarc Cornellà
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.
2015-12-14Move current_branch() from git plugin to core lib/git.zshAndrew Janke
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.
2015-09-23fix indentationMichele Bologna
2015-09-23Uniform git prompt equal remoteMichele Bologna
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
2015-06-15In addition to the already existing variables ZSH_THEME_GIT_PROMPT for behind,Michele Bologna
ahead and diverged remote, I added ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE.
2015-06-10Add git_prompt_behind and git_prompt_existsAdam Lindberg
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.
2015-06-10Added a possibility to display the remote branch and the number of commits ↵leif.hanack
you are ahead or behind
2014-12-14Merge pull request #3326 from DanielFGray/masterRobby Russell
ignore any grep aliases that might be defined
2014-11-19Switch back to oh-my-zsh.hide-dirty setting againMarc Cornellà
Commit 81004dfaba509ff62a13ba303ab941938d619326 reverted the change in 9b811fb625c03c30a766191cdf65a1c7c1fd96b2 when editing the merge conflict from #2928. This commit fixes that so that we don't make the same mistake again. First seen in http://git.io/Cdaj5Q
2014-11-16ignore any grep aliases that might be definedDanielFGray
2014-11-062928 merge conflictRobby Russell
2014-11-06Merge pull request #2323 from michaelorr/slow-git-fixRobby Russell
Renaming config for parse_git_dirty() to avoid collision
2014-07-15Merge pull request #2828 from r3dDoX/masterRobby Russell
removed a hardcoded 'origin' in git.zsh and added new function for number of commits ahead of remote
2014-07-03Fix POST_1_7_2_GIT check for parse_git_dirty submodules.Simon Buchan
2014-07-03Fix parse_git_dirty() when status.branch is set.Simon Buchan
2014-06-28git_prompt_info: ignore git-config errorsAlbert Krewinkel
Merged from #2906 The function `git_prompt_info` calls `git config` for its stdout output, but doesn't handle the stderr output. This can lead to problems, e.g. if the git config file is unreadable for some reason (permissions etc). This fixes the issue by simply ignoring the stderr output.
2014-06-28Add missing `command` wrapper for gitMikhail S. Pobolovets
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2014-06-10return 0 when not a git reponcanceill
before, 128 was returned, which could display an error, but out of a git repo this should exit silently fixes #2226
2014-05-26added prefix/suffix variable for customizabilityr3dDoX
2014-05-25added new function to get number of commits ahead of remoter3dDoX
2014-05-25replaced hardcoded origin/{branch-name} with @{upstream} which gets the ↵r3dDoX
upstream branch since git 1.7.0
2013-12-06accidentally blew away a git config setting used for another purpose, ↵Michael Orr
renaming in order to distinguish
2013-11-20adding a check for git config option to disable git_prompt_info() on a per ↵Michael Orr
repo basis
2013-06-12Fixed slow behavior when using GitHub wrappersTheodore Kokkoris
2013-05-19Adding a fix for the DISABLE_UNTRACKED_FILES_DIRTY option.Christopher Roach
2013-04-23Resolving conflict when merging in 1570Robby Russell
2013-04-23Merge pull request #1740 from felipec/fc/gitRobby Russell
git: fix parse_git_dirty()
2013-04-22Added option to allow untracked files as non dirtyJeremy Attali
In this commit, the option only works for git but it should not be to hard for someone who knows svn to so the same. This commit is largely inspired by @yoavweiss, I only added an option to use it.
2013-04-21git: fix parse_git_dirty()Felipe Contreras
If oh-my-zsh.hide-status is configured, the 'clean' code won't be generated, and some themes might end up distorted. Let's generate the 'clean' code even when we don't want the show the dirty status. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-04-07Merge pull request #1654 from bertag/parse-git-dirty-support-for-1.6Robby Russell
parse_git_dirty() support for Git 1.6
2013-04-03This fixes checking for git untracked itemsChristian Höltje
The grep expression was incorrect for normal grep. Adding the `-E` option fixed the escaping of the question marks.
2013-03-26Merge pull request #1661 from hellerbarde/masterRobby Russell
Fix some problems with git enabled prompts where they *always* claim to have untracked files
2013-03-14fix git_prompt_status() to not say the repository has untracked files all ↵Philip Stark
the time
2013-03-11Tweaked parse_git_dirty() in lib/git.zsh to support proper dirty/clean ↵bertag
parsing against both git 1.6 and git 1.7+
2013-02-19pipe git version check error to /dev/null (for when git doesn't exist)Thomas Minor
2013-02-13Did a full circle and went back to # On branch masterYoav Weiss
# Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: git.zsh #, ignoring untracked files, which seems to be the primary cause for slowness
2013-02-13Fixed dirty check to include files added to indexYoav Weiss
2013-01-30Closer to original status command, using SUBMODULE SYNTAXYoav Weiss
2013-01-27Faster dirty git status check (using git diff)Yoav Weiss
2013-01-10Merge pull request #1077 from Mezzle/add-option-to-show-git-statusRobby Russell
Add option to disable status notification
2012-12-07Add Stash toogle to display if there's some stash or not in `git_prompt_status`MAD
2012-12-04Merge pull request #1258 from caio/git-branch-statusRobby Russell
Add branch status support to git_prompt_status
2012-12-04Merge pull request #875 from ttddyy/prompt_git-removeRobby Russell
prompt git-rm as deleted
2012-12-02Merge pull request #1263 from tedv/headless-gitRobby Russell
Make git use sha when branch name is missing.