From: Nathan Panike <nwp@cs.wisc.edu>
To: Jeff King <peff@peff.net>
Cc: "Nathan W. Panike" <nathan.panike@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] Specify a precision for the length of a subject string
Date: Wed, 21 Dec 2011 08:51:13 -0600 [thread overview]
Message-ID: <20111221145112.GA13097@llunet.cs.wisc.edu> (raw)
In-Reply-To: <20111221043843.GA20714@sigill.intra.peff.net>
On Tue, Dec 20, 2011 at 11:38:43PM -0500, Jeff King wrote:
> On Tue, Dec 20, 2011 at 04:07:54PM -0600, Nathan W. Panike wrote:
>
> > We can specify the precision of a subject string, so that length the subjects
> > viewed by the user do not grow beyond a bound set by the user, in a pretty
> > formatted string
> >
> > This makes it possible to do, e.g.,
> >
> > $ git log --pretty='%h %s' d165204 -1
> > d165204 git-p4: fix skipSubmitEdit regression
> >
> > With this patch, the user can do
> >
> > $ git log --pretty='%h %30s' d165204 -1
> > d165204 git-p4: fix skipSubmitEdit reg
>
> Hmm. I think the idea of limiting is OK (though personally, I would just
> pipe through a filter that truncates long lines). But I'm a bit negative
> on adding a tweak like this that only affects the subject. Is there a
> reason I couldn't do %30gs, or %30f, or even some other placeholder?
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.
>
> Also, we already have %w to handle wrapping. Could this be handled in a
> similar way (perhaps it could even be considered a special form of
> wrapping)?
I'll look at the wrapping code and see. Thanks for the idea.
>
> -Peff
next prev parent reply other threads:[~2011-12-21 14:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-20 22:07 [PATCH] Specify a precision for the length of a subject string Nathan W. Panike
2011-12-20 22:15 ` Thomas Rast
2011-12-20 22:50 ` Nathan Panike
2011-12-21 4:38 ` Jeff King
2011-12-21 14:51 ` Nathan Panike [this message]
2011-12-23 10:09 ` Jeff King
2011-12-23 10:35 ` Jeff King
2011-12-23 20:58 ` Junio C Hamano
2011-12-23 23:02 ` Jeff King
2011-12-23 23:03 ` Jeff King
2011-12-23 10:35 ` [PATCH 1/2] pretty: refactor --format "magic" placeholders Jeff King
2011-12-23 10:36 ` [PATCH 2/2] pretty: allow "max-size" magic for all placeholders Jeff King
2011-12-21 11:26 ` [PATCH] Specify a precision for the length of a subject string Andreas Schwab
2011-12-21 14:53 ` Nathan Panike
2011-12-23 9:41 ` Miles Bader
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111221145112.GA13097@llunet.cs.wisc.edu \
--to=nwp@cs.wisc.edu \
--cc=git@vger.kernel.org \
--cc=nathan.panike@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).