Re: avoiding rejects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux