Re: [PATCH] bash prompt: add option to disable for a repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 23, 2013 at 4:42 PM, Johannes Sixt <j6t@xxxxxxxx> wrote:
> Gah! This adds a fork+exec each time the prompt is shown. Not good,
> particularly on Windows.
>
> Since your intent is to disable the prompt in the home directory,
> wouldn't that mean that most of the time you *don't* want the prompt?
> Wouldn't you be better served with a method that *turns on* the prompt?
> For example, a shell function that sets PS1 and another one that unsets
> it? Or a wrapper that inspects a shell variable and calls __git_ps1 only
> when you want a prompt.

Actually, I do want the prompt for all other git repositories. The
problem with $HOME is that it's the default directory after logging in
or opening a terminal, so if you have git prompt sourced and your
$HOME under git, you get an unbearable delay every time you open a
terminal, or type a command, anywhere, except for a separate git
repository.

And I do believe I'm not the only one putting $HOME under git, so I
think some kind of generic solution to this problem would be nice.

If running git config on each prompt seems too expensive, do you have
any better ideas?

Regards,

-- 
Heikki Hokkanen
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]