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

Re: [PATCH] log: make --abbrev-commit's ellipsis configurable

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 13, 2009, 21:32 UTC
Message-ID
<7vprhm81kk.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1234529920-9694-1-git-send-email-trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
Show 6 quoted lines
> 'git log --abbrev-commit' adds an ellipsis to all commit names that
> were abbreviated.  This is annoying if you want to cut&paste the sha1
> from the terminal, since selecting by word will pick up '...' too.
> (And this cannot be fixed by making '.' a non-word character; in other
> instances, such as the '123457..abcdef0' from git-fetch, it's part of
> the expression.)
I actually think that it is a bug that --abbrev-commit uses ellipses.

It has been there since "diff --abbrev" was first introduced by commit 47dd0d5 (diff: --abbrev option, 2005-12-13). It did make sense to align columns in abbreviated raw diff output with ellipses, but it did not make much sense to do that for commit object names.

Some scripts might be relying on the presense of ellipses but depending on the object distribution, the length of the ellipses can range from zero to three; if they are expecting to always see three dots, such scripts are already broken.

For this reason, I do not think it is necessarily a bad idea to make this change even unconditionally to both plumbing and Porcelain.

Previous: Jeff KingNext: Thomas Rast
Message 8 of 11 in “log: make --abbrev-commit's ellipsis configurable”
  1. log: make --abbrev-commit's ellipsis configurableThomas Rast, Feb 13, 2009
  2. Johannes SchindelinFeb 13, 2009
  3. Thomas RastFeb 13, 2009
  4. Johannes SchindelinFeb 13, 2009
  5. log: make --abbrev-commit's ellipsis configurableThomas Rast, Feb 13, 2009
  6. Johannes SixtFeb 13, 2009
  7. Jeff KingFeb 13, 2009
  8. Junio C HamanoFeb 13, 2009
  9. log: do not print ellipses with --abbrev-commitThomas Rast, Feb 13, 2009
  10. Jeff KingFeb 13, 2009
  11. Jakub NarebskiFeb 13, 2009

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.