From d747bd8d3708ba28165fc3ef0d8ee87485691895 Mon Sep 17 00:00:00 2001 From: Leonid Volnitsky Date: Fri, 1 Jul 2011 10:42:07 +0300 Subject: reverted accidantal merge of remote-watch --- git-prompt.sh | 33 ++------------------------------- 1 file 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 }" -- cgit v1.2.3