public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: avoiding rejects
Date: Wed, 11 Jul 2007 11:21:09 +0300	[thread overview]
Message-ID: <469492F5.8070006@panasas.com> (raw)
In-Reply-To: <20070710124422.a52b0458.akpm@linux-foundation.org>

Andrew Morton wrote:
> 
> 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.
> -
But you have lost the order you have just stated. 
"Order by time of addition" ascending ;)

Sometimes what I do is a diff with only post sync lines. 
With -p and the end of the list it mostly works.

consider this file
<list1>
BEGIN LIST
	I1
	I2
	I3
END LIST
..
...
</list1>

and consider this patch

<list2.patch>
--- list1	2007-07-11 10:33:26.000000000 +0300
+++ list2	2007-07-11 10:22:16.000000000 +0300
@@ -5,2 +5,3 @@ BEGIN LIST
+	add1
 END LIST
 ..
</list2.patch>

Now this will work. In fact you can apply this patch 
multiple times and it will keep adding Items. "patch"
will not warn about reverse patching, but ...
It will add Items from the top. Actually it will add
the Item at an absolute line in the file. At -# line 
stated at hunk header, like "-5" above.

Free Life
Boaz

  parent reply	other threads:[~2007-07-11  9:06 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
2007-07-10 21:06 ` Geert Uytterhoeven
2007-07-10 22:03   ` Arnd Bergmann
2007-07-11  8:21 ` Boaz Harrosh [this message]
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=469492F5.8070006@panasas.com \
    --to=bharrosh@panasas.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox