Skip to content

Iron output of describe --contains --all

Ramkumar Ramachandra git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3name-rev: fix assumption about --name-only usageDocumentation/git-name-rev.txt builtin/name-rev.c t/t4202-log.sh +1 more+26 -232 replies
2/3name-rev: strip trailing ^0 in when --name-onlybuiltin/name-rev.c+8 -13 replies
3/3name-rev doc: rewrite --stdin paragraphDocumentation/git-name-rev.txt+4 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Iron output of describe --contains --all

Hi,

I actually sent these patches to the list last month, but nobody seemed to be interested. This is an unedited resend.

I looked into adding tests, but decided that it was a lost cause: the output is too loosely defined for any scripts to rely on it strongly. [1/3] already shows a race between branches and tags. For another example, consider two tags are pointing to same commit (D and R in t6120-describe.sh). Run the following on the two tags and see what happens for yourself:

  $ git describe --contains
  $ git describe --all
  $ git describe --tags

Now think about various combinations of these options. I'm not saying that it's a Bad Thing (TM), but that nobody has bothered tightening the output.

My main motivation for doing this series is my prompt: I don't want to see

artagnon|(tags/v1.8.3^0)~/src/git$

when

artagnon|(v1.8.3)~/src/git$

is so much more pleasant and consistent. Obviously, hacking around this problem in the prompt script is the Wrong thing to do.

Thanks.

Ramkumar Ramachandra (3):
name-rev: fix assumption about --name-only usage
name-rev: strip trailing ^0 in when --name-only name-rev doc: rewrite --stdin paragraph

 Documentation/git-name-rev.txt       | 12 +++++++-----
 builtin/name-rev.c                   | 12 +++++++++++-
 t/t4202-log.sh                       |  8 ++++----
 t/t6007-rev-list-cherry-pick-file.sh | 32 ++++++++++++++++----------------
 4 files changed, 38 insertions(+), 26 deletions(-)
Signature · 1 line
1.8.3.2.737.gcbc076a.dirty