{"thread":{"id":"16332","subject":"Can git ignore parts of files","startedAt":"2008-11-14T19:17:32Z","lastAt":"2008-11-16T08:37:08Z","messageCount":5,"participants":["Alan","Francis Galiegue","Elijah Newren","Daniel Barkalow"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"95817","messageId":"1226690252.6176.9.camel@rotwang.fnordora.org","threadId":"16332","inReplyTo":null,"subject":"Can git ignore parts of files","fromName":"Alan","fromEmail":"alan@clueserver.org","sentAt":"2008-11-14T19:17:32Z","receivedAt":"2008-11-14T19:17:32Z","isPatch":false,"sender":{"key":"alan@clueserver.org","avatar":null},"body":"I have kind of an odd problem that is causing me grief in git.  I figure\nsomeone has a good solution here.  (Or not, they will soon.)\n\nI have a couple of kernel .config files that are checked into git.  They\nare used to test kernel configurations for the nightly builds where I\nwork.\n\nWe have a bunch of kernel developers working on drivers.  When they add\na new driver, they add in the options in the test file to make it\ncompile in the test builds.\n\nThe problem is that the kernel config file has a timestamp at the top of\nthe file that is generated by \"make oldconfig\" or \"make config\".  Other\nthan removing the timestamp each time manually, is there a way to get\ngit to ignore the timestamp on a merge?\n\nWhat happens is that the authors submit the changes on a branch in most\ncases.  Sometimes they have a version of that file that is quite out of\ndate.  When I go to merge, that one file gives me grief 95% of the time.\n\nIs there an easy way around this?  Am I approaching the problem wrong?\nIs there a better way to do this?\n"},{"id":"95818","messageId":"200811142033.51019.fg@one2team.net","threadId":"16332","inReplyTo":"1226690252.6176.9.camel@rotwang.fnordora.org","subject":"Re: Can git ignore parts of files","fromName":"Francis Galiegue","fromEmail":"fg@one2team.net","sentAt":"2008-11-14T19:33:50Z","receivedAt":"2008-11-14T19:33:50Z","isPatch":false,"sender":{"key":"fg@one2team.net","avatar":null},"body":"Le Friday 14 November 2008 20:17:32 Alan, vous avez écrit :\n> I have kind of an odd problem that is causing me grief in git.  I figure\n> someone has a good solution here.  (Or not, they will soon.)\n>\n> I have a couple of kernel .config files that are checked into git.  They\n> are used to test kernel configurations for the nightly builds where I\n> work.\n>\n> We have a bunch of kernel developers working on drivers.  When they add\n> a new driver, they add in the options in the test file to make it\n> compile in the test builds.\n>\n> The problem is that the kernel config file has a timestamp at the top of\n> the file that is generated by \"make oldconfig\" or \"make config\".  Other\n> than removing the timestamp each time manually, is there a way to get\n> git to ignore the timestamp on a merge?\n>\n> What happens is that the authors submit the changes on a branch in most\n> cases.  Sometimes they have a version of that file that is quite out of\n> date.  When I go to merge, that one file gives me grief 95% of the time.\n>\n> Is there an easy way around this?  Am I approaching the problem wrong?\n> Is there a better way to do this?\n>\n\nDo they ever touch to the kernel core? You say that they are developing \ndrivers, they basically use core kernel interfaces but not modify them right?\n\nFor quite a few years now, the kernel build system has allowed one to build \ndrivers out of the kernel tree (but _using_ the kernel tree) fairly easily. \nWhy not go this route? You won't have any conflict problems anymore, _and_ \nyou can maintain (and update) your kernel tree regularly.\n\n-- \nfge\n"},{"id":"95821","messageId":"1226692725.6176.10.camel@rotwang.fnordora.org","threadId":"16332","inReplyTo":"200811142033.51019.fg@one2team.net","subject":"Re: Can git ignore parts of files","fromName":"Alan","fromEmail":"alan@clueserver.org","sentAt":"2008-11-14T19:58:45Z","receivedAt":"2008-11-14T19:58:45Z","isPatch":false,"sender":{"key":"alan@clueserver.org","avatar":null},"body":"On Fri, 2008-11-14 at 20:33 +0100, Francis Galiegue wrote:\n> Le Friday 14 November 2008 20:17:32 Alan, vous avez écrit :\n> > I have kind of an odd problem that is causing me grief in git.  I figure\n> > someone has a good solution here.  (Or not, they will soon.)\n> >\n> > I have a couple of kernel .config files that are checked into git.  They\n> > are used to test kernel configurations for the nightly builds where I\n> > work.\n> >\n> > We have a bunch of kernel developers working on drivers.  When they add\n> > a new driver, they add in the options in the test file to make it\n> > compile in the test builds.\n> >\n> > The problem is that the kernel config file has a timestamp at the top of\n> > the file that is generated by \"make oldconfig\" or \"make config\".  Other\n> > than removing the timestamp each time manually, is there a way to get\n> > git to ignore the timestamp on a merge?\n> >\n> > What happens is that the authors submit the changes on a branch in most\n> > cases.  Sometimes they have a version of that file that is quite out of\n> > date.  When I go to merge, that one file gives me grief 95% of the time.\n> >\n> > Is there an easy way around this?  Am I approaching the problem wrong?\n> > Is there a better way to do this?\n> >\n> \n> Do they ever touch to the kernel core? You say that they are developing \n> drivers, they basically use core kernel interfaces but not modify them right?\n> \n> For quite a few years now, the kernel build system has allowed one to build \n> drivers out of the kernel tree (but _using_ the kernel tree) fairly easily. \n> Why not go this route? You won't have any conflict problems anymore, _and_ \n> you can maintain (and update) your kernel tree regularly.\n\nBecause these will go into core at some later date.  (I work for Intel.)\n"},{"id":"95823","messageId":"51419b2c0811141206s2fcedfa4udc609702299cc366@mail.gmail.com","threadId":"16332","inReplyTo":"1226690252.6176.9.camel@rotwang.fnordora.org","subject":"Re: Can git ignore parts of files","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2008-11-14T20:06:41Z","receivedAt":"2008-11-14T20:06:41Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Fri, Nov 14, 2008 at 12:17 PM, Alan <alan@clueserver.org> wrote:\n> I have kind of an odd problem that is causing me grief in git.  I figure\n> someone has a good solution here.  (Or not, they will soon.)\n>\n> I have a couple of kernel .config files that are checked into git.  They\n> are used to test kernel configurations for the nightly builds where I\n> work.\n>\n> We have a bunch of kernel developers working on drivers.  When they add\n> a new driver, they add in the options in the test file to make it\n> compile in the test builds.\n>\n> The problem is that the kernel config file has a timestamp at the top of\n> the file that is generated by \"make oldconfig\" or \"make config\".  Other\n> than removing the timestamp each time manually, is there a way to get\n> git to ignore the timestamp on a merge?\n>\n> What happens is that the authors submit the changes on a branch in most\n> cases.  Sometimes they have a version of that file that is quite out of\n> date.  When I go to merge, that one file gives me grief 95% of the time.\n>\n> Is there an easy way around this?  Am I approaching the problem wrong?\n> Is there a better way to do this?\n\nSomeone wrote a special merge algorithm to handle similar conflicts in\ntracked ChangeLog files (see\nhttp://www.mail-archive.com/bug-gnulib@gnu.org/msg09183.html).\nPerhaps you could write a similar merge algorithm and use it?\n\nHope that helps,\nElijah\n"},{"id":"95930","messageId":"alpine.LNX.1.00.0811160331110.19665@iabervon.org","threadId":"16332","inReplyTo":"1226690252.6176.9.camel@rotwang.fnordora.org","subject":"Re: Can git ignore parts of files","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-11-16T08:37:08Z","receivedAt":"2008-11-16T08:37:08Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Fri, 14 Nov 2008, Alan wrote:\n\n> I have kind of an odd problem that is causing me grief in git.  I figure\n> someone has a good solution here.  (Or not, they will soon.)\n> \n> I have a couple of kernel .config files that are checked into git.  They\n> are used to test kernel configurations for the nightly builds where I\n> work.\n> \n> We have a bunch of kernel developers working on drivers.  When they add\n> a new driver, they add in the options in the test file to make it\n> compile in the test builds.\n> \n> The problem is that the kernel config file has a timestamp at the top of\n> the file that is generated by \"make oldconfig\" or \"make config\".  Other\n> than removing the timestamp each time manually, is there a way to get\n> git to ignore the timestamp on a merge?\n\nTry the \"clean\"/\"smudge\" filter feature documented in gitattributes(5). \nYou should be able to use that to remove the timestamp automatically.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"}]}