diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2011-07-01 10:42:07 +0300 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2011-07-01 10:42:07 +0300 |
commit | d747bd8d3708ba28165fc3ef0d8ee87485691895 (patch) | |
tree | eb86cbb6a4a148eb1e7c7b7bb6833789b033f076 | |
parent | only in the master branch (diff) | |
download | git-prompt-d747bd8d3708ba28165fc3ef0d8ee87485691895.tar.gz git-prompt-d747bd8d3708ba28165fc3ef0d8ee87485691895.tar.bz2 git-prompt-d747bd8d3708ba28165fc3ef0d8ee87485691895.zip |
reverted accidantal merge of remote-watch
-rwxr-xr-x | git-prompt.sh | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/git-prompt.sh b/git-prompt.sh index 69f3c4a..ee025a1 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -506,35 +506,7 @@ parse_git_status() { # branch="$(git describe --exact-match HEAD 2>/dev/null)" || \ # branch="$(cut -c1-7 "$git_dir/HEAD")..." fi - if [[ $branch == "master" ]]; then - # Only work with master branch - # TODO : make this a module on/off - # hourly checks new commits in remotes - fetchUpdate=3600 - remotes=() - for remote in $(git remote) - do - if [[ ! -e $git_dir/FETCH_HEAD ]]; then - git fetch $remote >& /dev/null & - else - fetchDate=$(date --utc --reference=$git_dir/FETCH_HEAD +%s) - now=$(date --utc +%s) - delta=$(( $now - $fetchDate )) - # if last update to .git/FETCH_HEAD file - if [[ $delta -gt $fetchUpdate ]]; then - git fetch $remote >& /dev/null & - fi - fi - if [[ $(git branch -a | grep $remote) != "" ]]; then - nRemoteCommit=$(git log --oneline HEAD..$remote/master | wc -l) - if [[ -f $git_dir/FETCH_HEAD && $nRemoteCommit != "0" ]]; then - remotes+=" "${remote/origin/o}:$nRemoteCommit - fi - else - git fetch $remote >& /dev/null & - fi - done - fi + #### GET GIT HEX-REVISION if [[ $rawhex_len -gt 0 ]] ; then @@ -581,7 +553,6 @@ parse_vcs_status() { unset vcs vcs_info unset status modified untracked added init detached unset file_list modified_files untracked_files added_files - unset remotes [[ $vcs_ignore_dir_list =~ $PWD ]] && return @@ -650,7 +621,7 @@ parse_vcs_status() { fi - head_local="$vcs_color(${vcs_info}$vcs_color${file_list}$vcs_color$remotes)" + head_local="$vcs_color(${vcs_info}$vcs_color${file_list}$vcs_color)" ### fringes head_local="${head_local+$vcs_color$head_local }" |