From: SZEDER Gábor Date: Tue, 07 Dec 2010 09:58:18 GMT Subject: Re: [PATCH] describe: Don’t look up commits with --exact-match Message-ID: <20101207095818.GB1867@neumann> In-Reply-To: Hi, On Mon, Dec 06, 2010 at 12:28:59PM -0500, Anders Kaseorg wrote: > This makes ‘git describe --exact-match HEAD’ about 15 times faster on > a cold cache (2.3s instead of 35s) in a linux-2.6 repository with many > packed tags. That’s a huge win for the interactivity of the __git_ps1 > shell prompt helper. I wanted to give it a try to see the performance improvements in the bash prompt for myself, but couldn't get to it so far. However, glancing through the logic finding out the current branch in __git_ps1, it seems that git describe is only run when git symbolic-ref HEAD failed, i.e. when on a detached head. So the performance improvement in the shell prompt is only there when on a detached head (and with lots of tags), right? If so, then I'd like to have "when on a detached head" appended to the commit message. Best, Gábor