From: SZEDER Gábor Date: Mon, 14 Jun 2010 12:36:33 GMT Subject: Re: [PATCH v2 2/2] bash completion: Support "divergence from upstream" warnings in __git_ps1 Message-ID: <20100614123633.GN4640@neumann> In-Reply-To: <93842467ca22405712cab23a9b3920c106df0f17.1276336602.git.trast@student.ethz.ch> Hi, On Sat, Jun 12, 2010 at 11:59:11AM +0200, Thomas Rast wrote: > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash > index 57245a8..a6cb435 100755 > --- a/contrib/completion/git-completion.bash > +++ b/contrib/completion/git-completion.bash > @@ -42,6 +42,17 @@ > # set GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're > # untracked files, then a '%' will be shown next to the branch name. > # > +# If you would like to see the difference between HEAD and its upstream, > +# set GIT_PS1_SHOWUPSTREAM to one of the following: > +# git use @{upstream} > +# svn attempt to DWIM svn upstream for normal and --stdlayout > +# ref unconditionally use > +# eval evaluate which should print the commit to use > +# Any other value DWIMs either svn or git, preferring svn if configured. Something like this should go in there somewhere: The bash.showUpstream config variable can be used to override the value of GIT_PS1_SHOWUPSTREAM on a per-repository basis. > +# > +# The difference will be shown as, e.g., "u+7-5" meaning that you are 7 > +# commits ahead of and 5 commits behind the upstream. > +# > # To submit patches: > # > # *) Read Documentation/SubmittingPatches