{"thread":{"id":"4141","subject":"how to display file history?","startedAt":"2006-05-15T05:52:18Z","lastAt":"2006-05-15T15:15:10Z","messageCount":3,"participants":["Brown, Len","Shawn Pearce","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"19967","messageId":"CFF307C98FEABE47A452B27C06B85BB670F4F8@hdsmsx411.amr.corp.intel.com","threadId":"4141","inReplyTo":null,"subject":"how to display file history?","fromName":"Brown, Len","fromEmail":"len.brown@intel.com","sentAt":"2006-05-15T05:52:18Z","receivedAt":"2006-05-15T05:52:18Z","isPatch":false,"sender":{"key":"len.brown@intel.com","avatar":"https://gravatar.com/avatar/a091f34f66caadb51d85a8a496800c6ccae73737e2f45762373e6b8c55fa5dd6?d=mp&s=160"},"body":"it is tiresome to access kernel.org/git tree display\nto see the list of commits that changed a particular file.\n(and for files on my local disk, this isn't available).\n\nHow do I print the list of commits that change a particular file\non my local disk?\n\nthanks,\n-Len\n \n"},{"id":"19969","messageId":"20060515060054.GA28252@spearce.org","threadId":"4141","inReplyTo":"CFF307C98FEABE47A452B27C06B85BB670F4F8@hdsmsx411.amr.corp.intel.com","subject":"Re: how to display file history?","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-05-15T06:00:54Z","receivedAt":"2006-05-15T06:00:54Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Brown, Len\" <len.brown@intel.com> wrote:\n> it is tiresome to access kernel.org/git tree display\n> to see the list of commits that changed a particular file.\n> (and for files on my local disk, this isn't available).\n> \n> How do I print the list of commits that change a particular file\n> on my local disk?\n\nI'm confused - why aren't these available on your local disk?  Do you\nnot have a clone of the kernel repository local?  If you don't have\na clone you aren't really going to be able to get a history.\n\nBut assuming you had one use whatchanged:\n\n\tgit whatchanged A\n\nwill show only the commits which affected file A, listing them in\nreverse order (most recent to oldest).\n\n-- \nShawn.\n"},{"id":"19999","messageId":"Pine.LNX.4.64.0605150811400.3866@g5.osdl.org","threadId":"4141","inReplyTo":"CFF307C98FEABE47A452B27C06B85BB670F4F8@hdsmsx411.amr.corp.intel.com","subject":"Re: how to display file history?","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-05-15T15:15:10Z","receivedAt":"2006-05-15T15:15:10Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Mon, 15 May 2006, Brown, Len wrote:\n>\n> it is tiresome to access kernel.org/git tree display\n> to see the list of commits that changed a particular file.\n> (and for files on my local disk, this isn't available).\n> \n> How do I print the list of commits that change a particular file\n> on my local disk?\n\nJust do\n\n\tgit whatchanged -p <file>\n\nwhich has worked pretty much since day one. In fact, it's much better than \nthat. The \"file\" can be any abritrary combination of files and/or \ndirectories, and it will track them all at the same time. So\n\n\tgit whatchanged -p arch/ia64 include/asm-ia64\n\nwill track the ia64-specific changes.\n\nNewer git versions (ie 1.3.x+) support this in \"git log\" too (it worked on \nolder gits, but it was unacceptably slow, so you might as well consider it \n\"nonworking\"). So\n\n\tgit log [-p] <filespec>\n\nis your friend.\n\nFinally, as usual, \"gitk\" is just a fancier log viewer. So just do\n\n\tgitk arch/ia64 include/asm-ia64\n\nand enjoy.\n\nYou really shouldn't go to gitweb. The history view of gitweb is much less \ncapable than any local view.\n\n\t\tLinus\n"}]}