# [PATCH] Match lightweight tags too in bash prompt

4 messages from 2010-11-19 to 2010-12-01. Participants: knittl, Shawn Pearce, Thiago Farina.
Thread: https://gitlist.dev/t/25789

## knittl, 2010-11-19 15:43

Subject: [PATCH] Match lightweight tags too in bash prompt
Message-ID: <AANLkTikeH=MODho_GsZP5VPQmt2NOoHyfw2pbt4yqGkt@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikeH%3DMODho_GsZP5VPQmt2NOoHyfw2pbt4yqGkt%40mail.gmail.com

```
>From 1fea30e0167681917b4f40a3cb2cde9a90706011 Mon Sep 17 00:00:00 2001
From: Daniel Knittl-Frank <knittl89+git@googlemail.com>
Date: Fri, 19 Nov 2010 16:40:02 +0100
Subject: [PATCH] Match lightweight tags too in bash prompt

provide `--tags` to git describe
---

bash prompt would display a commit's sha1, when checking out a lightweight tag.
provide --tags to git describe in the completion script, so it will
display the name
of the tag (as it already does for annotated tags)

 contrib/completion/git-completion.bash |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index f710469..604fa79 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -261,7 +261,7 @@ __git_ps1 ()
 				(describe)
 					git describe HEAD ;;
 				(* | default)
-					git describe --exact-match HEAD ;;
+					git describe --tags --exact-match HEAD ;;
 				esac 2>/dev/null)" ||

 				b="$(cut -c1-7 "$g/HEAD" 2>/dev/null)..." ||
-- 
1.7.3.2.334.gd1031


-- 
typed with http://neo-layout.org
myFtPhp -- visit http://myftphp.sf.net -- v. 0.4.7 released!

```

## Shawn Pearce, 2010-11-30 18:04

Subject: Re: [PATCH] Match lightweight tags too in bash prompt
Message-ID: <AANLkTi=0+s164XkWHho1++hvnTCAFg5=GGfMbHF4ugTE@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3D0%2Bs164XkWHho1%2B%2BhvnTCAFg5%3DGGfMbHF4ugTE%40mail.gmail.com
In-Reply-To: <AANLkTikeH=MODho_GsZP5VPQmt2NOoHyfw2pbt4yqGkt@mail.gmail.com>

```
On Fri, Nov 19, 2010 at 7:43 AM, knittl <knittl89@googlemail.com> wrote:
> From 1fea30e0167681917b4f40a3cb2cde9a90706011 Mon Sep 17 00:00:00 2001
> From: Daniel Knittl-Frank <knittl89+git@googlemail.com>
> Date: Fri, 19 Nov 2010 16:40:02 +0100
> Subject: [PATCH] Match lightweight tags too in bash prompt
>
> provide `--tags` to git describe

Missing signed-off-by-line.

> ---
>
> bash prompt would display a commit's sha1, when checking out a lightweight tag.
> provide --tags to git describe in the completion script, so it will
> display the name
> of the tag (as it already does for annotated tags)

This information is useful justification for the change.  It should
therefore appear in the commit message, above the --- line.

-- 
Shawn.

```

## knittl, 2010-11-30 23:16

Subject: Re: [PATCH] Match lightweight tags too in bash prompt
Message-ID: <AANLkTinoZbSqwtiRwZ5+FZyn=6y7usgFi6p-JVUUTM5g@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTinoZbSqwtiRwZ5%2BFZyn%3D6y7usgFi6p-JVUUTM5g%40mail.gmail.com
In-Reply-To: <AANLkTi=0+s164XkWHho1++hvnTCAFg5=GGfMbHF4ugTE@mail.gmail.com>

```
On Tue, Nov 30, 2010 at 7:04 PM, Shawn Pearce <spearce@spearce.org> wrote:
> On Fri, Nov 19, 2010 at 7:43 AM, knittl <knittl89@googlemail.com> wrote:
>> From 1fea30e0167681917b4f40a3cb2cde9a90706011 Mon Sep 17 00:00:00 2001
>> From: Daniel Knittl-Frank <knittl89+git@googlemail.com>
>> Date: Fri, 19 Nov 2010 16:40:02 +0100
>> Subject: [PATCH] Match lightweight tags too in bash prompt
>>
>> provide `--tags` to git describe
>
> Missing signed-off-by-line.

i mentioned the s-o-b line already in my forward-mail ;)

>> ---
>>
>> bash prompt would display a commit's sha1, when checking out a lightweight tag.
>> provide --tags to git describe in the completion script, so it will
>> display the name
>> of the tag (as it already does for annotated tags)
>
> This information is useful justification for the change.  It should
> therefore appear in the commit message, above the --- line.

ok, i'll resend v2 tomorrow morning to you and the mailing list


cheers, daniel

-- 
typed with http://neo-layout.org
myFtPhp -- visit http://myftphp.sf.net -- v. 0.4.7 released!

```

## Thiago Farina, 2010-12-01 13:08

Subject: Re: [PATCH] Match lightweight tags too in bash prompt
Message-ID: <AANLkTik3GS6By4=k2oV77jUkyF5570qc56jgWGG9+gZr@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTik3GS6By4%3Dk2oV77jUkyF5570qc56jgWGG9%2BgZr%40mail.gmail.com
In-Reply-To: <AANLkTinoZbSqwtiRwZ5+FZyn=6y7usgFi6p-JVUUTM5g@mail.gmail.com>

```
On Tue, Nov 30, 2010 at 9:16 PM, knittl <knittl89@googlemail.com> wrote:
> On Tue, Nov 30, 2010 at 7:04 PM, Shawn Pearce <spearce@spearce.org> wrote:
>> On Fri, Nov 19, 2010 at 7:43 AM, knittl <knittl89@googlemail.com> wrote:
>>> From 1fea30e0167681917b4f40a3cb2cde9a90706011 Mon Sep 17 00:00:00 2001
>>> From: Daniel Knittl-Frank <knittl89+git@googlemail.com>
>>> Date: Fri, 19 Nov 2010 16:40:02 +0100
>>> Subject: [PATCH] Match lightweight tags too in bash prompt
>>>
>>> provide `--tags` to git describe
>>
>> Missing signed-off-by-line.
>
> i mentioned the s-o-b line already in my forward-mail ;)
>

I don't see it. You mean the From: line? If yes, that is not the
convention used here.

You have to add a line:
Signed-off-by: Your Name <you@example.com>

Take a look at Documentation/SubmittingPatches

```
