martin f krafft wrote: > also sprach Mauro Carvalho Chehab <mche...@redhat.com> [2010.02.11.1259 > +1300]: >>>> For a replacement patch, you may try to use an algorithm like >>>> what -git does: get only the diff and compare the previous and >>>> the new version. If they are very close, you may consider the >>>> reply as a replacement. >>> How does Git do this? >> I never look at -git source code where this check is done, but, as >> the source code is available and well written, I think it >> shouldn't be hard to port it to patchwork. > > I don't even know what (Git) feature you are speaking of. >
If you rename a file and change some lines, or if you do a major change in a file, git has an algorithm to autodetect it. For example: 1 files changed, 126 insertions(+), 85 deletions(-) rewrite format_waiting_patches.pl (75%) It works based on a configurable threshold between the two file versions. If we use it to compare the two diffs in a reply, if they are 100% identical, the old patch may automatically be marked as superseed. If they aren't 100% identical, yet patchwork could provide a hint to the maintainer that the patch were likely superseded by a newer one (for example, if the diffs are 80% identical). -- Cheers, Mauro _______________________________________________ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork