All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] diff: add a config option to control orderfile
Date: Sun, 15 Sep 2013 11:08:30 +0300	[thread overview]
Message-ID: <20130915080830.GA30465@redhat.com> (raw)
In-Reply-To: <20130915074900.GA30438@redhat.com>

On Sun, Sep 15, 2013 at 10:49:00AM +0300, Michael S. Tsirkin wrote:
> On Wed, Sep 04, 2013 at 12:08:15AM +0300, Michael S. Tsirkin wrote:
> > On Tue, Sep 03, 2013 at 10:12:18AM -0700, Junio C Hamano wrote:
> > > "Michael S. Tsirkin" <mst@redhat.com> writes:
> > > 
> > > > I always want my diffs to show header files first,
> > > > then .c files, then the rest. Make it possible to
> > > > set orderfile though a config option to achieve this.
> > > >
> > > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > > ---
> > > 
> > > I admit that I was the guilty one who introduced the orderfile, but
> > > I think the feature was misguided (for one thing, it breaks the
> > > patch-id, I think).
> > 
> > This should be easy to fix - just sort before applying the ID, no?
> 
> Ping. Any comment on this idea?

Actually, after I've looked at the code,
diffcore_order is already already called for patch-id.
So patch-id shouldn't be broken by specifying the orderfile.
Why then is the feature misguided?

> > > So I am moderately hesitant to promote its use
> > > with an addition like this.
> > 
> > The status quo just makes people insist on using a script to generate patches for
> > mail.  Some projects put interface documentation in the header files, in
> > that case it makes sense to put .h before .c in the patch as it makes
> > review easier.
> > 
> > In fact I sometimes reorder chunks in the patch manually for readability -
> > it's probably worth finding a way to support this.
> > 
> > 
> > > >  diff.c | 3 +++
> > > >  1 file changed, 3 insertions(+)
> > > >
> > > > diff --git a/diff.c b/diff.c
> > > > index 208094f..cca0767 100644
> > > > --- a/diff.c
> > > > +++ b/diff.c
> > > > @@ -264,6 +264,9 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)
> > > >  		return 0;
> > > >  	}
> > > >  
> > > > +        if (!strcmp(var, "diff.orderfile"))
> > > > +                return git_config_string(&default_diff_options.orderfile, var, value);
> > > > +
> > > >  	if (!prefixcmp(var, "submodule."))
> > > >  		return parse_submodule_config_option(var, value);

  reply	other threads:[~2013-09-15  8:08 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-31 19:44 [PATCH] diff: add a config option to control orderfile Michael S. Tsirkin
2013-09-03 17:12 ` Junio C Hamano
2013-09-03 21:08   ` Michael S. Tsirkin
2013-09-15  7:49     ` Michael S. Tsirkin
2013-09-15  8:08       ` Michael S. Tsirkin [this message]
2013-09-17 16:26         ` Junio C Hamano
2013-09-17 16:42           ` Michael S. Tsirkin
2013-09-17 17:24             ` Junio C Hamano
2013-09-17 17:28               ` Michael S. Tsirkin
2013-09-17 18:06                 ` Junio C Hamano
2013-09-17 19:25                   ` Michael S. Tsirkin
2013-09-17 20:14                   ` Michael S. Tsirkin
2013-09-17 20:16                     ` Michael S. Tsirkin
2013-09-17 20:18                       ` Jeff King
2013-09-17 20:38                         ` Michael S. Tsirkin
2013-09-17 20:41                           ` Michael S. Tsirkin
2013-09-17 20:56                           ` Jeff King
2013-09-17 21:03                             ` Michael S. Tsirkin
2013-09-17 21:06                               ` Jeff King
2013-09-17 21:52                             ` Junio C Hamano
2013-09-19 21:32                             ` Michael S. Tsirkin
2013-09-23 21:09                               ` Michael S. Tsirkin
2013-09-23 21:37                                 ` Jonathan Nieder
2013-09-24  5:45                                   ` Jeff King
2013-09-24  5:54                                   ` Michael S. Tsirkin
2013-09-24 19:36                                     ` Jonathan Nieder
2013-09-24 20:15                                       ` Michael S. Tsirkin
2013-09-24 21:31                                         ` Jonathan Nieder
2013-09-24 21:57                                           ` Michael S. Tsirkin
2013-09-24 22:08                                             ` Jonathan Nieder
2013-09-17 20:31                       ` Michael S. Tsirkin
2013-09-21 21:08               ` Michael S. Tsirkin

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=20130915080830.GA30465@redhat.com \
    --to=mst@redhat.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.