Junio C Hamano <gitster@xxxxxxxxx> 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@xxxxxxxxx> > --- > > * 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. -- 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