Re: [PATCH] Specify a precision for the length of a subject string

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

 



On Fri, Dec 23, 2011 at 05:09:58AM -0500, Jeff King wrote:

> > The ones that make sense to limit are all those that depend on the subject, as the
> > above; it does not make sense to limit other fields that don't depend on the
> > subject, as they are fixed width, or have small variance. And it does not make
> > sense to me to limit the length of the body.
> 
> I agree the subject is the most likely place. I was thinking one might
> want to do it with the body, too. But whether it would be "I want N
> bytes of the body" or "truncate each body line at N bytes without
> wrapping", I don't know.

Another place that might want it is %N (commit notes).

Here's how I would have done it. Not involving %w at all, but applying
equally to all placeholders.

  [1/2]: pretty: refactor --format "magic" placeholders
  [2/2]: pretty: allow "max-size" magic for all placeholders

I'm not personally interested in this topic, so I won't be pushing for
this to be included in git. But if it feels like the right direction for
you, feel free to be build on it and post it as part of your series (or
just take it as inspiration and make your own commits). Off the top of
my head, it needs:

  - documentation updates
  - tests
  - userformat_want_item should also respect the same magic (it already
    duplicates some of the "-/+/ " magic. It might be nice to factor
    that part out).

-Peff
--
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]