summaryrefslogtreecommitdiff
path: root/lib/git.zsh
AgeCommit message (Collapse)Author
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.
2012-07-31Make git use sha when branch name is missing.Ted Vessenes
2012-07-29Add branch status support to git_prompt_statusCaio Romão
This patch makes git_prompt_status support three new status variables: - ZSH_THEME_GIT_PROMPT_AHEAD - ZSH_THEME_GIT_PROMPT_BEHIND - ZSH_THEME_GIT_PROMPT_DIVERGED With these extra variables it's easy to see (1) if you have commits in your local branch that weren't pushed to the remote (AHEAD), (2) if there are commits in the remote that you haven't merged/rebased yet (BEHIND) or (3) if you have local unpushed commits AND the remote has some commits you haven't merged yet (DIVERGED). Refer to the first line displayed on `git status -b --porcelain`. An example setup in a .zsh-theme file would be: ZSH_THEME_GIT_PROMPT_AHEAD="↑" ZSH_THEME_GIT_PROMPT_BEHIND="↓" ZSH_THEME_GIT_PROMPT_DIVERGED="↕"
2012-07-24MergeJames Smith
2012-04-18Add option to disable status notificationMartin Meredith
For certain git repositories, this slows down usage of the shell horifically. This option can be set with git config --add oh-my-zsh.hide-status 1 which will disable checking/showing the status notification
2012-02-21Fixed bug introduced when fixing issue 896cruser42
2012-02-08fixed introduced to parse_git_dirtyAleksey Orekhov
2012-02-08changed variable PRE_1_7_2_GIT to POST_1_7_2_GIT to make it more accurateAleksey Orekhov
2012-02-08fixed asterisk display for modified repos in git prior to 1.7.2Aleksey Orekhov
2012-01-26Removed trailing spaces in Git files. Fixes #867Carlos Rodriguez
2012-01-26prompt git-remove as deletedTadaya Tsuyukubo
2011-12-21Ignore submodules dirty in prompt infojulien@macbook