mbox series

[0/1] extend the truncating pretty formats

Message ID 20221030185614.3842-1-philipoakley@iee.email (mailing list archive)
Headers show
Series extend the truncating pretty formats | expand

Message

Philip Oakley Oct. 30, 2022, 6:56 p.m. UTC
A recent enquiry on the Git-Users list asked for horizontal log graphs
similar to those used in the manual ASCII art graphs. These use single
or double character short strings for commits.

The existing pretty pretty-formats are unable to truncate to single or
double characters because of their use of ellipsis `..`. As a starter,
let's add left and right hard truncation options to the existing
options as a preparatory step for potential `--horizontal` graphs.

It is noted that the  truncation options do not have any tests yet.

Also cc'ing Nsengiyumva who has proposed to look at unifying the 
ref-filter and --pretty formats [1]

--
Philip

To: Git List <git@vger.kernel.org>
Cc: NSENGIYUMVA WILBERFORCE <nsengiyumvawilberforce@gmail.com>
Cc: Taylor Blau <me@ttaylorr.com>
Cc: Junio C Hamano <gitster@pobox.com>


[1] https://lore.kernel.org/git/CA+PPyiE=baAoVkrghE5GQMt984AcaL=XBAQRsVRbN8w7jQA+ig@mail.gmail.com/

Philip Oakley (1):
  pretty-formats: add hard truncation, without ellipsis, options

 Documentation/pretty-formats.txt |  7 ++++---
 pretty.c                         | 18 +++++++++++++++++-
 2 files changed, 21 insertions(+), 4 deletions(-)

Comments

Philip Oakley Oct. 30, 2022, 9:41 p.m. UTC | #1
On 30/10/2022 18:56, Philip Oakley wrote:
> A recent enquiry on the Git-Users list 

forgot the link
https://groups.google.com/g/git-users/c/ayo_4Sy65TI/m/wRkmrcVWAQAJ

> asked for horizontal log graphs
> similar to those used in the manual ASCII art graphs. These use single
> or double character short strings for commits.
>
> The existing pretty pretty-formats are unable to truncate to single or
> double characters because of their use of ellipsis `..`. As a starter,
> let's add left and right hard truncation options to the existing
> options as a preparatory step for potential `--horizontal` graphs.
>
> It is noted that the  truncation options do not have any tests yet.
>
> Also cc'ing Nsengiyumva who has proposed to look at unifying the 
> ref-filter and --pretty formats [1]
>
> --
> Philip
>
> To: Git List <git@vger.kernel.org>
> Cc: NSENGIYUMVA WILBERFORCE <nsengiyumvawilberforce@gmail.com>
> Cc: Taylor Blau <me@ttaylorr.com>
> Cc: Junio C Hamano <gitster@pobox.com>
>
>
> [1] https://lore.kernel.org/git/CA+PPyiE=baAoVkrghE5GQMt984AcaL=XBAQRsVRbN8w7jQA+ig@mail.gmail.com/
>
> Philip Oakley (1):
>   pretty-formats: add hard truncation, without ellipsis, options
>
>  Documentation/pretty-formats.txt |  7 ++++---
>  pretty.c                         | 18 +++++++++++++++++-
>  2 files changed, 21 insertions(+), 4 deletions(-)
>