git branch help?
James Findley
sixy at gmx.com
Wed Aug 4 12:35:14 UTC 2010
On 08/03/2010 11:49 PM, Ben Boeckel wrote:
> Björn Persson<bjorn at xn--rombobjrn-67a.se> wrote:
>> Adam Williamson wrote:
>>> Would it be nice to stick this customization into fedora-packager, or
>>> would it just confuse/surprise people?
>>
>> Is it fast enough to not delay the prompt noticeably even on old computers?
>
> I use zsh's vcs_info and the only one I've found (out of git, hg, darcs,
> svn, and cvs) that doesn't feel like a no-op is bzr support.
>
>> What's the worst thing that could happen if it were to break? If Git were to
>> enter an infinite loop for example, would it render my shell useless?
>
> Yes, it would. The shell will wait until the process gets back (hence my
> non-support of bzr in my zsh config).
That's somewhat misleading - the user can use ctrl-c to interrupt it and
get a shell immediately.
>
>> Björn Persson
>
> --Ben
>
If you want this, you might be better off using a function like:
showgittree() {
tree="$(git symbolic-ref HEAD 2>/dev/null)"
echo "${tree:11}"
}
But I agree - please don't make this the default.
More information about the devel
mailing list