From mboxrd@z Thu Jan 1 00:00:00 1970 From: kai@gnukai.com (Kai Meyer) Date: Fri, 09 Sep 2011 12:12:25 -0600 Subject: how diff between hardlink trees works? In-Reply-To: References: Message-ID: <4E6A5709.1050101@gnukai.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On 09/09/2011 09:05 AM, Vaibhav Jain wrote: > Hi, > > I am not able to understand how diff between two trees of which one is > just contains hardlinks to another's files (cp -al )ing > works.I am asking this question here because I need to build a custom > kernel for which I need to generate patch. So the > documentation suggests to create a hardlink copy of the kernel source > tree using cp -al and then make changes to > one of the trees and run a diff.I am wondering that if files are > hardlinks then changes to one copy will affect another in which case > diff should give no output. > Also, the patch I created looks a little odd as it contains complete > modified files instead of just the differences. > Please help! > > Thanks > Vaibhav Jain > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies Make the hard link copy like normal. Then delete the directory that you are making changes to (in the hard link directory), then copy the files over with out hard links. That way "most" of the kernel tree is hard linked, and just the portion you want to work on is a copy. That way the diff will work. Otherwise, skip the hard link part all together, and just make a full copy. Uses lots of disk space and takes longer to diff. -Kai Meyer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110909/82f0fae4/attachment.html