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

cat-file ambiguity prints "dangling"

From
EWEric Wong <e@80x24.org>
Date
Jan 18, 2019, 03:38 UTC
Message-ID
<20190118033845.s2vlrb3wd3m2jfzu@dcvr>
Hi David,

Perhaps I'm confused, the cat-file manpage seems to indicate "dangling" only gets printed if I use "--follow-symlinks".

However, I'm not using "--follow-symlinks" and I get "dangling" when passing ambiguous object IDs:

Trying to check the ambiguous "dead" against git.git, I get:
	$ echo dead | git cat-file --batch-check 2>/dev/null
	dangling 4
	dead
Is the above intended?
stderr shows the ambiguity and gives me hints, which is expected.
Thanks.
Next: David Turner
Message 1 of 8 in “cat-file ambiguity prints "dangling"”
  1. Eric WongJan 18, 2019
  2. David TurnerJan 18, 2019
  3. Eric WongJan 18, 2019
  4. David TurnerJan 18, 2019
  5. t1512: test ambiguous cat-file --batch and --batch-outputEric Wong, Jan 18, 2019
  6. David TurnerJan 18, 2019
  7. SZEDER GáborJan 23, 2019
  8. t1512: test ambiguous cat-file --batch and --batch-outputEric Wong, Jan 30, 2019

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.