git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jul 7, 2013, 12:43 UTC
Message-ID
<1373200996-9753-1-git-send-email-artagnon@gmail.com>
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(-)
-- 
1.8.3.2.737.gcbc076a.dirty
Next: Ramkumar Ramachandra
Message 1 of 10 in “Iron output of describe --contains --all”
  1. 0/3 Iron output of describe --contains --allRamkumar Ramachandra, Jul 7, 2013
  2. 1/3 name-rev: fix assumption about --name-only usageRamkumar Ramachandra, Jul 7, 2013
  3. Junio C HamanoJul 7, 2013
  4. Ramkumar RamachandraJul 8, 2013
  5. 2/3 name-rev: strip trailing ^0 in when --name-onlyRamkumar Ramachandra, Jul 7, 2013
  6. Junio C HamanoJul 7, 2013
  7. Junio C HamanoJul 7, 2013
  8. Ramkumar RamachandraJul 8, 2013
  9. 3/3 name-rev doc: rewrite --stdin paragraphRamkumar Ramachandra, Jul 7, 2013
  10. Junio C HamanoJul 7, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.