mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Xiaolong Ye <xiaolong.ye@intel.com>,
	git@vger.kernel.org, ying.huang@intel.com, philip.li@intel.com,
	julie.du@intel.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Christoph Hellwig <hch@lst.de>, "H. Peter Anvin" <hpa@zytor.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC/PATCH 1/1] format-patch: add an option to record base tree info
Date: Tue, 23 Feb 2016 13:56:07 -0600	[thread overview]
Message-ID: <87r3g3jj54.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <20160223091740.GA3830@wfg-t540p.sh.intel.com> (Fengguang Wu's message of "Tue, 23 Feb 2016 17:17:40 +0800")


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

  parent reply	other threads:[~2016-02-23 20:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1456109938-8568-1-git-send-email-xiaolong.ye@intel.com>
     [not found] ` <1456109938-8568-2-git-send-email-xiaolong.ye@intel.com>
     [not found]   ` <xmqqmvqt8jgz.fsf@gitster.mtv.corp.google.com>
     [not found]     ` <20160223014741.GA21025@wfg-t540p.sh.intel.com>
     [not found]       ` <xmqqio1f3oi9.fsf@gitster.mtv.corp.google.com>
2016-02-23  9:17         ` Fengguang Wu
2016-02-23  9:23           ` H. Peter Anvin
2016-02-23  9:32             ` Fengguang Wu
2016-02-23 10:32           ` Dan Carpenter
2016-02-23 12:00             ` Fengguang Wu
2016-02-23 13:31               ` Dan Carpenter
2016-02-24  2:55                 ` Fengguang Wu
2016-02-24  6:30                   ` Junio C Hamano
2016-02-24  7:07                     ` Fengguang Wu
2016-02-24 18:34                       ` Junio C Hamano
2016-02-23 19:51           ` Junio C Hamano
2016-02-23 20:08             ` Eric W. Biederman
2016-02-23 20:35               ` Junio C Hamano
2016-02-23 20:46                 ` H. Peter Anvin
2016-02-23 21:49                   ` Eric W. Biederman
2016-02-24  1:40                     ` H. Peter Anvin
2016-02-23 22:21                   ` Stefan Beller
2016-02-24 10:31                     ` Michael J Gruber
2016-02-24  6:19                   ` Junio C Hamano
2016-02-24  3:36                 ` Fengguang Wu
2016-02-24  3:13             ` Fengguang Wu
2016-02-23 19:56           ` Eric W. Biederman [this message]
2016-02-24  2:30             ` Fengguang Wu

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=87r3g3jj54.fsf@x220.int.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=dan.carpenter@oracle.com \
    --cc=fengguang.wu@intel.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=julie.du@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philip.li@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=xiaolong.ye@intel.com \
    --cc=ying.huang@intel.com \
    /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

all inboxes | Powered by JetHome®