fedpkg switch-branch behavior

Todd Zullinger tmz at pobox.com
Thu Jan 13 19:19:15 UTC 2011


Jesse Keating wrote:
> At most, we could warn about your status compared to the local
> index, a simple "git status" would show that.  We cannot warn about
> your stats compared to upstream without fetching new data.

For folks with recent git (anything in Fedora will do, EPEL, not so
much), there's a few things you can add to your prompt to display
status -- assuming you're already using __git_ps1()¹.

The GIT_PS1_SHOWUPSTREAM environment variable can be set in various
ways.  Using auto gives you a prompt like:

    [tmz at panaeolus fedoraproject.org (master >)]$

showing that I am ahead of the remote master in my fedora-web clone.

See the comments in /etc/bash_completion.d/git for other possible
values for GIT_PS1_SHOWUPSTREAM.

¹ http://fedoraproject.org/wiki/Git_Quickref#Display_current_branch_in_bash

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Never take life seriously.  Nobody gets out alive anyway.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20110113/a24a31f5/attachment.bin 


More information about the devel mailing list