{"thread":{"id":"3972","subject":"how to trace the patch?","startedAt":"2006-04-27T10:06:09Z","lastAt":"2006-04-27T16:19:56Z","messageCount":4,"participants":["Aubrey","sean","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"19174","messageId":"6d6a94c50604270306j44c280bdo283591f2f595f74e@mail.gmail.com","threadId":"3972","inReplyTo":null,"subject":"how to trace the patch?","fromName":"Aubrey","fromEmail":"aubreylee@gmail.com","sentAt":"2006-04-27T10:06:09Z","receivedAt":"2006-04-27T10:06:09Z","isPatch":false,"sender":{"key":"aubreylee@gmail.com","avatar":null},"body":"Hi all,\n\nWhen I update the kernel git tree a few days later, you know, there\ncould be a lot of patches. Then I found one file changed, how can I\nknow which patch the modification belong to?\nHow can I find the patch?\nMany thanks,\n\nRegards,\n-Aubrey\n"},{"id":"19177","messageId":"BAYC1-PASMTP029B6CB13A6C0BA3956E17AEBD0@CEZ.ICE","threadId":"3972","inReplyTo":"6d6a94c50604270306j44c280bdo283591f2f595f74e@mail.gmail.com","subject":"Re: how to trace the patch?","fromName":"sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-04-27T10:57:28Z","receivedAt":"2006-04-27T10:57:28Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Thu, 27 Apr 2006 18:06:09 +0800\nAubrey <aubreylee@gmail.com> wrote:\n\n> When I update the kernel git tree a few days later, you know, there\n> could be a lot of patches. Then I found one file changed, how can I\n> know which patch the modification belong to?\n> How can I find the patch?\n\nHi Aubrey,\n\n$ git log -- <filename>\n\nTo see a list of commits that affected the file you're interested in.\n\n$ git log -p -- <filename>\n\nWill include a diff after each commit showing you how the file was\nchanged.  And if you want to see what other changes happened in each\ncommit that modified your file, add \"--full-diff\" to the command above.\n\nNote that you can also replace the <filename> with a <directory> \nto see a list of commits that affected any file below that directory.\n\nHTH,\nSean\n"},{"id":"19185","messageId":"Pine.LNX.4.64.0604270843190.3701@g5.osdl.org","threadId":"3972","inReplyTo":"BAYC1-PASMTP029B6CB13A6C0BA3956E17AEBD0@CEZ.ICE","subject":"Re: how to trace the patch?","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-04-27T15:55:51Z","receivedAt":"2006-04-27T15:55:51Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 27 Apr 2006, sean wrote:\n> \n> $ git log -- <filename>\n> \n> To see a list of commits that affected the file you're interested in.\n> \n> $ git log -p -- <filename>\n> \n> Will include a diff after each commit showing you how the file was\n> changed.  And if you want to see what other changes happened in each\n> commit that modified your file, add \"--full-diff\" to the command above.\n\nSide note: the \"git log -p\" thing only works with git 1.3.0+, and even \nwithout the \"-p\", old versions will be very slow.\n\nSo if you have anything older than 1.3.0, you're likely better off using \n\"git whatchanged [-p] -- <filename>\".\n\nAlso, regardless of which one you use, it's worth pointing out that:\n\n - for tracking multiple files, just use more than one filename, and you \n   can also use a directory name. \n\n - you can combine this with all the normal revision limiting rules, which \n   is often useful when you know you're not interested in stuff you've \n   already seen.\n\nFor example, if you have just done a \"git pull\" and you noticed that a \nfile (or set of files) you cared about changed - or you just wonder _if_ \nit changed - you can do something like\n\n\tgitk ORIG_HEAD.. -- drivers/scsi/ include/scsi/\n\nto see what changed due to the pull within those files. Useful whether \nyou're tracking certain subsystems, individual drivers, architectures, \nwhatever.. It can be useful also just to split the logs up (ie maybe \nyou're not interested in anything in particular, but you do a \"git log\" \nand see something that strikes your fancy, you can decide to see what \n_else_ changed in that area).\n\nAnd instead of \"gitk\", use \"git log -p\" or \"git whatchanged\" or whatever. \nIt's all the same thing, just different ways of looking at it.\n\n\t\tLinus\n"},{"id":"19187","messageId":"6d6a94c50604270919w2c4b8f9er796168f03577e736@mail.gmail.com","threadId":"3972","inReplyTo":"Pine.LNX.4.64.0604270843190.3701@g5.osdl.org","subject":"Re: how to trace the patch?","fromName":"Aubrey","fromEmail":"aubreylee@gmail.com","sentAt":"2006-04-27T16:19:56Z","receivedAt":"2006-04-27T16:19:56Z","isPatch":false,"sender":{"key":"aubreylee@gmail.com","avatar":null},"body":"Thanks a lot.\nI'll enjoy it.\n\nRegards,\n-Aubrey\n\nOn 4/27/06, Linus Torvalds <torvalds@osdl.org> wrote:\n>\n>\n> On Thu, 27 Apr 2006, sean wrote:\n> >\n> > $ git log -- <filename>\n> >\n> > To see a list of commits that affected the file you're interested in.\n> >\n> > $ git log -p -- <filename>\n> >\n> > Will include a diff after each commit showing you how the file was\n> > changed.  And if you want to see what other changes happened in each\n> > commit that modified your file, add \"--full-diff\" to the command above.\n>\n> Side note: the \"git log -p\" thing only works with git 1.3.0+, and even\n> without the \"-p\", old versions will be very slow.\n>\n> So if you have anything older than 1.3.0, you're likely better off using\n> \"git whatchanged [-p] -- <filename>\".\n>\n> Also, regardless of which one you use, it's worth pointing out that:\n>\n>  - for tracking multiple files, just use more than one filename, and you\n>   can also use a directory name.\n>\n>  - you can combine this with all the normal revision limiting rules, which\n>   is often useful when you know you're not interested in stuff you've\n>   already seen.\n>\n> For example, if you have just done a \"git pull\" and you noticed that a\n> file (or set of files) you cared about changed - or you just wonder _if_\n> it changed - you can do something like\n>\n>        gitk ORIG_HEAD.. -- drivers/scsi/ include/scsi/\n>\n> to see what changed due to the pull within those files. Useful whether\n> you're tracking certain subsystems, individual drivers, architectures,\n> whatever.. It can be useful also just to split the logs up (ie maybe\n> you're not interested in anything in particular, but you do a \"git log\"\n> and see something that strikes your fancy, you can decide to see what\n> _else_ changed in that area).\n>\n> And instead of \"gitk\", use \"git log -p\" or \"git whatchanged\" or whatever.\n> It's all the same thing, just different ways of looking at it.\n>\n>                Linus\n>\n"}]}