Gaetan Semet
881a2be64f
Merge remote-tracking branch 'upstream/master'
...
# Conflicts:
# plugins/jump/jump.plugin.zsh
2016-10-11 21:56:56 +02:00
Yuichi Tanikawa
27fff27253
Fix git_prompt_status() not showing ahead/behind/diverged status correctly ( #5388 )
2016-09-08 00:23:04 +02:00
Marc Cornellà
71201ffd67
git: output nothing when no commits ahead or behind
...
This fixes old git_commits_ahead behavior and changes git_commits_behind
to have the same behavior.
Fixes #5355
2016-09-05 11:22:48 +02:00
Gaetan Semet
b3fb83b2d6
Merge remote-tracking branch 'upstream/master'
2016-08-10 17:38:10 +02:00
Steven
61981951b1
Updated git_commits_ahead function ( #5247 )
...
* 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-08-01 17:48:46 +02:00
Steven
96a2092e37
lib/git.zsh: Added git_commits_behind function ( #4450 )
...
* Added git_commits_behind function
* Added 'command' to git_commits_behind function
* git_commits_behind code review changes
2016-07-15 11:05:39 +02:00
Gaetan Semet
dbe8c470ce
Merge remote-tracking branch 'upstream/master'
2016-04-01 18:12:33 +02:00
Aesop Wolf
69e1506ad9
Add git user profile functions for prompt display
2016-03-31 14:16:46 -07:00
Gaetan Semet
6000880f2d
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
lib/git.zsh
2016-02-04 01:18:13 +01:00
Michele Bologna
87f8251388
Re-added $ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE
...
Re-added $ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE variable which was removed in 9f55213
2016-01-13 15:36:59 +01:00
Marc Cornellà
0842384987
Put local var declaration in its own line in lib/git.zsh
...
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-17 18:37:49 +01:00
Andrew Janke
9f552130bd
Move current_branch() from git plugin to core lib/git.zsh
...
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-12-14 20:28:37 -05:00
Gaetan Semet
6376140a7c
Merge remote-tracking branch 'upstream/master'
...
# Conflicts:
# tools/install.sh
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
2015-10-16 22:24:48 +02:00
Michele Bologna
12e99b5334
fix indentation
2015-09-23 11:14:14 +02:00
Michele Bologna
5323954c98
Uniform git prompt equal remote
...
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-09-23 10:52:24 +02:00
Gaetan Semet
9a63084e20
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
plugins/git/git.plugin.zsh
plugins/jump/jump.plugin.zsh
2015-08-10 16:15:53 +02:00
Michele Bologna
01e355fb1e
In addition to the already existing variables ZSH_THEME_GIT_PROMPT for behind,
...
ahead and diverged remote, I added ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE.
2015-06-15 10:15:22 +02:00
Adam Lindberg
2d40cc0bb3
Add git_prompt_behind and git_prompt_exists
...
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-10 14:36:55 +02:00
leif.hanack
70c4a27fd6
Added a possibility to display the remote branch and the number of commits you are ahead or behind
2015-06-10 14:36:54 +02:00
Gaetan Semet
1611be25ff
Merge remote-tracking branch 'upstream/master'
2014-12-23 16:51:46 +01:00
Robby Russell
eced76e0fd
Merge pull request #3326 from DanielFGray/master
...
ignore any grep aliases that might be defined
2014-12-14 16:32:11 -08:00
Gaetan Semet
a32d89278a
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
plugins/jump/jump.plugin.zsh
themes/ys.zsh-theme
2014-11-24 13:43:37 +01:00
Marc Cornellà
a301f567e3
Switch back to oh-my-zsh.hide-dirty setting again
...
Commit 81004dfaba reverted the change
in 9b811fb625 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-19 18:40:18 +01:00
DanielFGray
00ec11d3c0
ignore any grep aliases that might be defined
2014-11-16 02:47:35 -06:00
Robby Russell
81004dfaba
2928 merge conflict
2014-11-06 09:24:00 -08:00
Robby Russell
160abc9a8d
Merge pull request #2323 from michaelorr/slow-git-fix
...
Renaming config for parse_git_dirty() to avoid collision
2014-11-06 09:15:00 -08:00
Gaetan Semet
cdcda28bca
Merge remote-tracking branch 'upstream/master'
2014-07-15 17:47:03 +02:00
Robby Russell
01da53e10f
Merge pull request #2828 from r3dDoX/master
...
removed a hardcoded 'origin' in git.zsh and added new function for number of commits ahead of remote
2014-07-15 07:38:55 -07:00
Gaetan Semet
ec49ae1a98
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
lib/git.zsh
plugins/common-aliases/common-aliases.plugin.zsh
plugins/repo/repo.plugin.zsh
templates/zshrc.zsh-template
2014-07-03 16:18:02 +02:00
Simon Buchan
2927ce3714
Fix POST_1_7_2_GIT check for parse_git_dirty submodules.
2014-07-03 14:45:49 +12:00
Simon Buchan
676fb4e420
Fix parse_git_dirty() when status.branch is set.
2014-07-03 14:38:19 +12:00
Albert Krewinkel
c5d9fc9968
git_prompt_info: ignore git-config errors
...
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-28 10:12:20 +02:00
Mikhail S. Pobolovets
49161e7847
Add missing command wrapper for git
...
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2014-06-28 10:12:19 +02:00
ncanceill
7fbbf28e6e
return 0 when not a git repo
...
before, 128 was returned, which could display an error,
but out of a git repo this should exit silently
fixes #2226
2014-06-10 09:52:57 +02:00
r3dDoX
514693125b
added prefix/suffix variable for customizability
2014-05-26 10:47:51 +02:00
r3dDoX
59c8fcc712
added new function to get number of commits ahead of remote
2014-05-25 14:13:21 +02:00
r3dDoX
3c485db8c7
replaced hardcoded origin/{branch-name} with @{upstream} which gets the upstream branch since git 1.7.0
2014-05-25 14:13:07 +02:00
Gaetan Semet
e984e9a52c
Merge remote-tracking branch 'styx/styx/git_command_prompt_fix'
2014-02-24 15:06:24 +01:00
Mikhail S. Pobolovets
77781d2efe
Add missing command wrapper for git
...
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2014-02-24 14:46:37 +03:00
Michael Orr
9b811fb625
accidentally blew away a git config setting used for another purpose, renaming in order to distinguish
2013-12-06 17:31:35 -05:00
Gaetan Semet
24f2838f0b
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
README.textile
lib/aliases.zsh
plugins/repo/repo.plugin.zsh
templates/zshrc.zsh-template
themes/ys.zsh-theme
2013-12-03 09:41:48 +01:00
Michael Orr
fbd479b68e
adding a check for git config option to disable git_prompt_info() on a per repo basis
2013-11-20 12:30:55 -05:00
Benjamin Chrétien
c638f9d7fd
Get number of lines changed for Git
2013-07-17 10:06:24 +02:00
Gaetan Semet
b77ccd7c8f
Merge remote-tracking branch 'upstream/master'
2013-06-25 15:39:23 +02:00
Theodore Kokkoris
9703eba66e
Fixed slow behavior when using GitHub wrappers
2013-06-12 20:04:08 +03:00
Gaetan Semet
781364a35a
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
lib/theme-and-appearance.zsh
plugins/tmux/tmux.plugin.zsh
2013-06-05 11:10:38 +02:00
Gaetan Semet
1959f579e1
Add rebase flag in prompt
...
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
2013-06-05 11:02:49 +02:00
Christopher Roach
4ff861ee11
Adding a fix for the DISABLE_UNTRACKED_FILES_DIRTY option.
2013-05-19 12:55:10 -07:00
Robby Russell
7cdb6d667c
Resolving conflict when merging in 1570
2013-04-23 20:21:18 -07:00
Robby Russell
30b0eb3ffa
Merge pull request #1740 from felipec/fc/git
...
git: fix parse_git_dirty()
2013-04-23 19:42:58 -07:00