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

Re: [PATCH] ls-tree: add --abbrev[=<n>] option

From
Junio C Hamano <junkio@cox.net>
Date
Mar 7, 2006, 17:56 UTC
Message-ID
<7vzmk2jfzr.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060307135202.GA17891@localdomain>

Output from ls-tree and ls-files -s are primarily for script consumption. diff-raw output which already has abbrev is also primarily for scripts, but we have an excuse there that human eyes can spot differences easier in abbreviated form and two values on the same row being different is the only information we are conveying in "git whatchanged" default output, and not abbreviating the object names makes pathnames pushed to far right of the display which will be chopped by "less -S".

So I am not quite sure if I should take this, and a subsequent one you would probably send for ls-files ;-).

Care to point out a use case I might have missed that this is useful? I've never done ls-tree to be read by _me_ (not by script) unless I am debugging ls-tree itself.

Although I doubt this adds much practical value, this might make things consistent, which by itself might be a reason to do this, though.

Previous: Eric WongNext: Eric Wong
Message 2 of 4 in “ls-tree: add --abbrev[=<n>] option”
  1. ls-tree: add --abbrev[=<n>] optionEric Wong, Mar 7, 2006
  2. Junio C HamanoMar 7, 2006
  3. Eric WongMar 7, 2006
  4. ls-files: add --abbrev[=<n>] optionEric Wong, Mar 7, 2006

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.