Re: cosmetic bug: "git show --pretty:format" produces different output than "git show --format"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes:

> Unfortunately, "--format" seems to be parsed as ("--pretty" and
> therefore?) "--pretty=tformat:" which I consider a bug.

"tformat:" was introduced to fix "format:, because many people found
the latter hard to use, probably because most of the time they
wanted to use the feature to show one-line-per-commit and a LF after
each record ("terminator semantics" where 't' in "tformat:" comes
from) made more sense in that context, compared to a LF between each
record ("delimiter semantics").

Of course, "format:" that uses the delimiter semantics has its uses;
after all, the delimiter semantics is what is used for canned
formats, other than --oneline.

It was a deliberate design decision to make "--format=<string>" as a
short-hand for "--pretty=tformat:<string>", favouring "tformat:"
over "format:", AFAIK.  To use the facility to show a break between
each (likely multi-line) record, use "--pretty=format:<string>", not
"--pretty=tformat:<string>" aka "--format=<string>".
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]