Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:10

Possibly related (same subject, not in this thread)

Thomas Rast [off-list ref] writes:
'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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help