{"thread":{"id":"39336","subject":"determine a linux kernel version of a patch file","startedAt":"2015-05-14T17:08:10Z","lastAt":"2015-05-15T20:16:39Z","messageCount":6,"participants":["Pawel Por","Johannes Schindelin","Matthieu Moy","Kelvin Li","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"261241","messageId":"CAJmOuExq3WF26Gufr5bAA7w3=EMxJ80NKMXf8Dgi0TK7kVXStA@mail.gmail.com","threadId":"39336","inReplyTo":null,"subject":"determine a linux kernel version of a patch file","fromName":"Pawel Por","fromEmail":"porparek@gmail.com","sentAt":"2015-05-14T17:08:10Z","receivedAt":"2015-05-14T17:08:10Z","isPatch":false,"sender":{"key":"porparek@gmail.com","avatar":null},"body":"Hi,\n\nAt the beginning I'm sorry if this post is completely unrelated to\nthis mailing list.\nI'm trying to find the base linux kernel version from which a patch\nhas been created and posted to LKML.\nMost patches contain the index line. Is it the well known git index\n(staging area) ?\nCan I use the index to find the exact kernel version from which a\npatch was created.\nPlease look at an example patch sent to LKML:\nhttps://lkml.org/lkml/2015/5/14/497\n\nIt contains the following index line:\nindex 8dd1e55..9b0c81e 100644\n\nI tried to find it using \"git log\" but I couldn't.\n\nPlease help me to determine the exact kernel version.\n\nthanks in advance\n"},{"id":"261246","messageId":"041beaedd8018f1759158e488b29a42b@www.dscho.org","threadId":"39336","inReplyTo":"CAJmOuExq3WF26Gufr5bAA7w3=EMxJ80NKMXf8Dgi0TK7kVXStA@mail.gmail.com","subject":"Re: determine a linux kernel version of a patch file","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-05-14T17:25:05Z","receivedAt":"2015-05-14T17:25:05Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Pawel,\n\nOn 2015-05-14 19:08, Pawel Por wrote:\n\n> Most patches contain the index line. Is it the well known git index\n> (staging area) ?\n> Can I use the index to find the exact kernel version from which a\n> patch was created.\n> Please look at an example patch sent to LKML:\n> https://lkml.org/lkml/2015/5/14/497\n> \n> It contains the following index line:\n> index 8dd1e55..9b0c81e 100644\n> \n> I tried to find it using \"git log\" but I couldn't.\n\nIf you call `git log --raw` (possibly adding --all) and then search for 8dd1e55, you should at least get to the revision when this file was changed to the revision that served as base for the patch. To make it faster, you could call `git log --raw -- <filename>`. That would also have the advantage that you could scroll up again to see which revision, if any, modified the file again, giving you kind of a commit range from which to pick.\n\nCiao,\nJohannes\n"},{"id":"261335","messageId":"vpqr3qicabd.fsf@anie.imag.fr","threadId":"39336","inReplyTo":"CAJmOuExq3WF26Gufr5bAA7w3=EMxJ80NKMXf8Dgi0TK7kVXStA@mail.gmail.com","subject":"Re: determine a linux kernel version of a patch file","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2015-05-15T12:08:38Z","receivedAt":"2015-05-15T12:08:38Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Pawel Por <porparek@gmail.com> writes:\n\n> Hi,\n>\n> At the beginning I'm sorry if this post is completely unrelated to\n> this mailing list.\n> I'm trying to find the base linux kernel version from which a patch\n> has been created and posted to LKML.\n> Most patches contain the index line. Is it the well known git index\n> (staging area) ?\n\nThis is the id of the blob object corresponding to the _file_ being\npatched (index <from>..<to> <mode>). That's why you don't see it in git\nlog: git log shows you ids for commit objects (which point to trees,\nwhich in turn points to blob).\n\nSee Johannes' answer for how you can get some possible commits.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"261351","messageId":"1431709433.1401.9.camel@gmail.com","threadId":"39336","inReplyTo":"vpqr3qicabd.fsf@anie.imag.fr","subject":"Re: determine a linux kernel version of a patch file","fromName":"Kelvin Li","fromEmail":"ltwisabc@gmail.com","sentAt":"2015-05-15T17:03:53Z","receivedAt":"2015-05-15T17:03:53Z","isPatch":false,"sender":{"key":"ltwisabc@gmail.com","avatar":null},"body":"On Fri, 2015-05-15 at 14:08 +0200, Matthieu Moy wrote:\n> Pawel Por <porparek@gmail.com> writes:\n> \n> > Hi,\n> >\n> > At the beginning I'm sorry if this post is completely unrelated to\n> > this mailing list.\n> > I'm trying to find the base linux kernel version from which a patch\n> > has been created and posted to LKML.\n> > Most patches contain the index line. Is it the well known git index\n> > (staging area) ?\n> \n> This is the id of the blob object corresponding to the _file_ being\n> patched (index <from>..<to> <mode>). That's why you don't see it in git\n> log: git log shows you ids for commit objects (which point to trees,\n> which in turn points to blob).\n> \n> See Johannes' answer for how you can get some possible commits.\n> \n\nCome to think of it, why is that line named \"index\"? Conceptually, this\n\"diff header index\" seems distinct from the \"staging area index\", but\ncalling both \"index\" is confusing, in my opinion.\n\nIs there already a note about this in the docs somewhere? At the very\nleast, \"git help diff\" seems to happily use both senses of the word\nwithout any acknowledgement that we're overloading it.\n\nThanks,\nKelvin\n"},{"id":"261354","messageId":"c97f7591e4bf884ee810699f1e5278dd@www.dscho.org","threadId":"39336","inReplyTo":"1431709433.1401.9.camel@gmail.com","subject":"Re: determine a linux kernel version of a patch file","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-05-15T17:41:01Z","receivedAt":"2015-05-15T17:41:01Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn 2015-05-15 19:03, Kelvin Li wrote:\n> On Fri, 2015-05-15 at 14:08 +0200, Matthieu Moy wrote:\n>> Pawel Por <porparek@gmail.com> writes:\n>>\n>> > At the beginning I'm sorry if this post is completely unrelated to\n>> > this mailing list.\n>> > I'm trying to find the base linux kernel version from which a patch\n>> > has been created and posted to LKML.\n>> > Most patches contain the index line. Is it the well known git index\n>> > (staging area) ?\n>>\n>> This is the id of the blob object corresponding to the _file_ being\n>> patched (index <from>..<to> <mode>). That's why you don't see it in git\n>> log: git log shows you ids for commit objects (which point to trees,\n>> which in turn points to blob).\n>>\n>> See Johannes' answer for how you can get some possible commits.\n>>\n> \n> Come to think of it, why is that line named \"index\"? Conceptually, this\n> \"diff header index\" seems distinct from the \"staging area index\", but\n> calling both \"index\" is confusing, in my opinion.\n> \n> Is there already a note about this in the docs somewhere? At the very\n> least, \"git help diff\" seems to happily use both senses of the word\n> without any acknowledgement that we're overloading it.\n\nBy default, `git diff` works on the index, unless you force it to compare revisions or the working directory to a revision. I guess that is where the wording comes from.\n\nIn any case, it is too late to change it now...\n\nCiao,\nJohannes\n"},{"id":"261370","messageId":"xmqqvbftfvfc.fsf@gitster.dls.corp.google.com","threadId":"39336","inReplyTo":"c97f7591e4bf884ee810699f1e5278dd@www.dscho.org","subject":"Re: determine a linux kernel version of a patch file","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-15T20:16:39Z","receivedAt":"2015-05-15T20:16:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> By default, `git diff` works on the index, unless you force it to\n> compare revisions or the working directory to a revision. I guess that\n> is where the wording comes from.\n>\n> In any case, it is too late to change it now...\n\nThose who are interested in the full answer can look at this thread.\n\n  http://thread.gmane.org/gmane.comp.version-control.git/9694/focus=9795\n\n;-)\n"}]}