[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r3g3jj54.fsf@x220.int.ebiederm.org>
Date: Tue, 23 Feb 2016 13:56:07 -0600
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Fengguang Wu <fengguang.wu@...el.com>
Cc: Junio C Hamano <gitster@...ox.com>,
Xiaolong Ye <xiaolong.ye@...el.com>, git@...r.kernel.org,
ying.huang@...el.com, philip.li@...el.com, julie.du@...el.com,
Linus Torvalds <torvalds@...ux-foundation.org>,
Christoph Hellwig <hch@....de>,
"H. Peter Anvin" <hpa@...or.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC/PATCH 1/1] format-patch: add an option to record base tree info
Fengguag Wu, Xiaolong Ye, have you attempted to use the truncated
sha1 of the file the patch applies to? Git already places a file sha1
at the top of a patch. See the index line?
> diff --git a/fs/namespace.c b/fs/namespace.c
> index eccd925c6e82..3c3f8172c734 100644
> --- a/fs/namespace.c
> +++ b/fs/namespace.c
As I understand it you are aiming for making a good guess what the patch
or patches apply to, having a set of file hashes looks like it would
give you that.
All it should take is to iterate over a patchset and for each file in
the patchset capture the first file hash. Then in the smallish set of
maintainer trees see if that set of file hashes matches any of their
recent commits. You should be able to prune the set of possible
maintainer trees even more by looking at the mailling list or lists
the patch was submitted to.
Before we talk about adding anything more I think we need a clear
picture of what you have tried with what already exists. A decade ago
part of the problem was that not everyone used git. At best it will
take a little while before everyone upgrades to a version of git diff
containing your changes, and if possibly even longer if they have to
start specifying an additional option when a diff is generated.
Eric
Powered by blists - more mailing lists