From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Elijah Newren" Subject: Re: Can git ignore parts of files Date: Fri, 14 Nov 2008 13:06:41 -0700 Message-ID: <51419b2c0811141206s2fcedfa4udc609702299cc366@mail.gmail.com> References: <1226690252.6176.9.camel@rotwang.fnordora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: git@vger.kernel.org To: Alan X-From: git-owner@vger.kernel.org Fri Nov 14 21:08:03 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1L14xR-0004JD-5e for gcvg-git-2@gmane.org; Fri, 14 Nov 2008 21:07:57 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753710AbYKNUGm (ORCPT ); Fri, 14 Nov 2008 15:06:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753286AbYKNUGm (ORCPT ); Fri, 14 Nov 2008 15:06:42 -0500 Received: from rv-out-0506.google.com ([209.85.198.234]:52298 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751898AbYKNUGm (ORCPT ); Fri, 14 Nov 2008 15:06:42 -0500 Received: by rv-out-0506.google.com with SMTP id k40so1531512rvb.1 for ; Fri, 14 Nov 2008 12:06:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=VcWE7tsQq8wV0SdhVyTXvSSvW1jrGNW2qvMGFBfXdKc=; b=jjlCb0fA2M5JgjbhgzIWf5vogndG8mZLm/26rGzDl4wafLUg8/7uI8W0rCeGyJACyf PYbcAME/9MUTAmLjtRL5bn6WBZ9itbvp5DsvMvByB5KF1V02CF8V8JyAsdWyDLTgYNMG I6+8i2NyhoCmZukIuEUGD05Y7i971M6vpzrMU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=AFMU1lsAIdkKOAIhTpQH6FG2HGCi0s81Jsdea20RxqiARnXIJkM5W4jUyvMNwWN9xi i8HfQ3b5746andkX8nAEE5Hliqms6XikelkYuzFV7WeEX4ESJ/+Ev19z4sD3KWF/I90f 1GkfO21R3dwHuedFvtRGK4kMfhhuc7SJrv5r0= Received: by 10.141.37.8 with SMTP id p8mr722517rvj.227.1226693201359; Fri, 14 Nov 2008 12:06:41 -0800 (PST) Received: by 10.140.169.18 with HTTP; Fri, 14 Nov 2008 12:06:41 -0800 (PST) In-Reply-To: <1226690252.6176.9.camel@rotwang.fnordora.org> Content-Disposition: inline Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Fri, Nov 14, 2008 at 12:17 PM, Alan wrote: > I have kind of an odd problem that is causing me grief in git. I figure > someone has a good solution here. (Or not, they will soon.) > > I have a couple of kernel .config files that are checked into git. They > are used to test kernel configurations for the nightly builds where I > work. > > We have a bunch of kernel developers working on drivers. When they add > a new driver, they add in the options in the test file to make it > compile in the test builds. > > The problem is that the kernel config file has a timestamp at the top of > the file that is generated by "make oldconfig" or "make config". Other > than removing the timestamp each time manually, is there a way to get > git to ignore the timestamp on a merge? > > What happens is that the authors submit the changes on a branch in most > cases. Sometimes they have a version of that file that is quite out of > date. When I go to merge, that one file gives me grief 95% of the time. > > Is there an easy way around this? Am I approaching the problem wrong? > Is there a better way to do this? Someone wrote a special merge algorithm to handle similar conflicts in tracked ChangeLog files (see http://www.mail-archive.com/bug-gnulib@gnu.org/msg09183.html). Perhaps you could write a similar merge algorithm and use it? Hope that helps, Elijah