From: Dan Aloni <da-x@monatomic.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: avoiding rejects
Date: Tue, 10 Jul 2007 23:19:23 +0300 [thread overview]
Message-ID: <20070710201923.GA22675@localdomain> (raw)
In-Reply-To: <20070710124422.a52b0458.akpm@linux-foundation.org>
On Tue, Jul 10, 2007 at 12:44:22PM -0700, Andrew Morton wrote:
>
> There are many situations where patching the kernel involves adding a new
> item to a list, such as:
>
> - adding a makefile line
> - adding a new #include
> - adding a new Kconfig entry
> - adding a new PCI ID
> - adding a record to feature-removal.txt
> - adding a new sysctl table entry
> - etc
>
> Of course, everyone just sticks the new entry at the end of the existing
> entries. This strategy carefully maximises the opportunity for patch
> rejects and leads to unhappiness.
>
> Most of these lists are unordered anyway, so inserting the new item at a
> randomly-chosen position is a better approach than just appending it.
AFAIK some Kconfig entries do have some importance to order (take
kernel/Kconfig.hz for example, though it's not a good one, not long
enough).
I think that random insertions can hurt on the readability side. So, here's
a list of more ways to discuss:
1. How about adding a context-aware logic to the merging process? (i.e,
project-specific "plugins") That is, beside the regular 3-line context,
the merging logic can be a aware of particular file formats, whether it's a
Kconfig tree-like structure or list of lines all starting with a prefix of
'#include'.
2. Alternatively, these special one-liner diff hunks can be generated with
smaller context space (2, 1, or even no lines). This means instead of
adding context-awareness to the merger process, add context-awareness
to the diff generator. The other 'more complex' code modifications hunks
must remain with a context of 3 lines.
3. Another option is to come up with file formats that have '3 space
lines' dilimeters between items (it wouldn't make sense for #include, but
for PCI IDs it might be worth it).
--
Dan Aloni
XIV LTD, http://www.xivstorage.com
da-x (at) monatomic.org, dan (at) xiv.co.il
next prev parent reply other threads:[~2007-07-10 20:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 19:44 avoiding rejects Andrew Morton
2007-07-10 20:19 ` Dan Aloni [this message]
2007-07-10 21:06 ` Geert Uytterhoeven
2007-07-10 22:03 ` Arnd Bergmann
2007-07-11 8:21 ` Boaz Harrosh
2007-07-11 9:44 ` Jan Engelhardt
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=20070710201923.GA22675@localdomain \
--to=da-x@monatomic.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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.