git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] diff: add a config option to control orderfile

From
MTMichael S. Tsirkin <mst@redhat.com>
Date
Sep 15, 2013, 08:08 UTC
Message-ID
<20130915080830.GA30465@redhat.com>
In-Reply-To
<20130915074900.GA30438@redhat.com>
On Sun, Sep 15, 2013 at 10:49:00AM +0300, Michael S. Tsirkin wrote:
Show 18 quoted lines
> 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?

Show 28 quoted lines
> > > 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);
Previous: Michael S. TsirkinNext: Junio C Hamano
Message 5 of 32 in “diff: add a config option to control orderfile”
  1. diff: add a config option to control orderfileMichael S. Tsirkin, Aug 31, 2013
  2. Junio C HamanoSep 3, 2013
  3. Michael S. TsirkinSep 3, 2013
  4. Michael S. TsirkinSep 15, 2013
  5. Michael S. TsirkinSep 15, 2013
  6. Junio C HamanoSep 17, 2013
  7. Michael S. TsirkinSep 17, 2013
  8. Junio C HamanoSep 17, 2013
  9. Michael S. TsirkinSep 17, 2013
  10. Junio C HamanoSep 17, 2013
  11. Michael S. TsirkinSep 17, 2013
  12. Michael S. TsirkinSep 17, 2013
  13. Michael S. TsirkinSep 17, 2013
  14. Jeff KingSep 17, 2013
  15. Michael S. TsirkinSep 17, 2013
  16. Michael S. TsirkinSep 17, 2013
  17. Jeff KingSep 17, 2013
  18. Michael S. TsirkinSep 17, 2013
  19. Jeff KingSep 17, 2013
  20. Junio C HamanoSep 17, 2013
  21. Michael S. TsirkinSep 19, 2013
  22. Michael S. TsirkinSep 23, 2013
  23. Jonathan NiederSep 23, 2013
  24. Jeff KingSep 24, 2013
  25. Michael S. TsirkinSep 24, 2013
  26. Jonathan NiederSep 24, 2013
  27. Michael S. TsirkinSep 24, 2013
  28. Jonathan NiederSep 24, 2013
  29. Michael S. TsirkinSep 24, 2013
  30. Jonathan NiederSep 24, 2013
  31. Michael S. TsirkinSep 17, 2013
  32. Michael S. TsirkinSep 21, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.