git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] completion: enhance "current branch" display
Date: Sun, 10 May 2009 14:18:18 -0700	[thread overview]
Message-ID: <20090510211818.GA30527@spearce.org> (raw)
In-Reply-To: <7vvdo91glm.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> wrote:
> Introduce GIT_PS1_DESCRIBE option you can set to "contains", "branch", or
> "describe" to tweak the way how a detached HEAD is described.
> 
> The default behaviour is to describe only exact match with some tag
> (otherwise use the first 7 hexdigits) as before.
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> 
>  * I do not think the new modes based on name-rev (aka "--contains") are
>    much useful if you do your own development while on a detached HEAD,
>    but they probably are useful for tourists who sightsee.

Yea, both patches are sensible.

IIRC the desire for name-rev was for detached HEAD in contexts
like what git submodule produce.  If you are sitting on a tagged
version in a submodule, its nice to see that in your prompt.
Since you aren't developing there right now, there is no branch,
and you are just sightseeing.

This feature may have started at my prior job, where we had our
own git submodule like tool integrated with our build system,
that predated git submodule.  But its also still really useful
with say the Android Open Source Project, where users have 150 or
so git repositories, all on detached HEADs, most pointing at an
annotated tag.

-- 
Shawn.

      parent reply	other threads:[~2009-05-10 21:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-10  8:56 [PATCH 2/2] completion: enhance "current branch" display Junio C Hamano
2009-05-10 10:59 ` Johannes Sixt
2009-05-10 11:33   ` Michal Nazarewicz
2009-05-10 11:57     ` Johannes Sixt
2009-05-10 21:18 ` Shawn O. Pearce [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090510211818.GA30527@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).