Re: [PATCH v4] pretty-formats: add hard truncation, without ellipsis, options
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 22, 2022, 00:57 UTC
- Message-ID
- <xmqqedtvu7py.fsf@gitster.g>
- In-Reply-To
- <d80d1b97-b0c0-148b-afb7-f5210366e463@iee.email>
Philip Oakley <philipoakley@iee.email> writes:
Show 8 quoted lines
>> As a design question, what should "Trunc" do in such a case now? I >> do not think we can still call it "hard truncate" if the feature >> gives "[][]" (i.e. fill only 4 display columns, resulting in a >> string that is not wide enough) or "[][][]" (i.e. exceed 5 columns >> that are given), but of course chomping a letter in the middle is >> not acceptable behaviour, so ... > The design had already covered those cases. The author already had those > thoughts
Sorry, I was saying that none of
* giving only [][] to fill only 4 display columns, without filling the given 5 display columns,
* giving [][][] to fill 6 display columns, exceeding the given 5 display columns,
* giving [][][ that chomps a letter in the middle, in a failed attempt to fill exactly 5 displya columns.
would be a sensible design of the behaviour for "Trunc", so I am not sure what "had already covered" really mean...