Git development
 help / color / mirror / Atom feed
* Can git ignore parts of files
@ 2008-11-14 19:17 Alan
  2008-11-14 19:33 ` Francis Galiegue
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alan @ 2008-11-14 19:17 UTC (permalink / raw)
  To: git

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?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can git ignore parts of files
  2008-11-14 19:17 Can git ignore parts of files Alan
@ 2008-11-14 19:33 ` Francis Galiegue
  2008-11-14 19:58   ` Alan
  2008-11-14 20:06 ` Elijah Newren
  2008-11-16  8:37 ` Daniel Barkalow
  2 siblings, 1 reply; 5+ messages in thread
From: Francis Galiegue @ 2008-11-14 19:33 UTC (permalink / raw)
  To: Alan; +Cc: git

Le Friday 14 November 2008 20:17:32 Alan, vous avez écrit :
> 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?
>

Do they ever touch to the kernel core? You say that they are developing 
drivers, they basically use core kernel interfaces but not modify them right?

For quite a few years now, the kernel build system has allowed one to build 
drivers out of the kernel tree (but _using_ the kernel tree) fairly easily. 
Why not go this route? You won't have any conflict problems anymore, _and_ 
you can maintain (and update) your kernel tree regularly.

-- 
fge

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can git ignore parts of files
  2008-11-14 19:33 ` Francis Galiegue
@ 2008-11-14 19:58   ` Alan
  0 siblings, 0 replies; 5+ messages in thread
From: Alan @ 2008-11-14 19:58 UTC (permalink / raw)
  To: Francis Galiegue; +Cc: git

On Fri, 2008-11-14 at 20:33 +0100, Francis Galiegue wrote:
> Le Friday 14 November 2008 20:17:32 Alan, vous avez écrit :
> > 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?
> >
> 
> Do they ever touch to the kernel core? You say that they are developing 
> drivers, they basically use core kernel interfaces but not modify them right?
> 
> For quite a few years now, the kernel build system has allowed one to build 
> drivers out of the kernel tree (but _using_ the kernel tree) fairly easily. 
> Why not go this route? You won't have any conflict problems anymore, _and_ 
> you can maintain (and update) your kernel tree regularly.

Because these will go into core at some later date.  (I work for Intel.)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can git ignore parts of files
  2008-11-14 19:17 Can git ignore parts of files Alan
  2008-11-14 19:33 ` Francis Galiegue
@ 2008-11-14 20:06 ` Elijah Newren
  2008-11-16  8:37 ` Daniel Barkalow
  2 siblings, 0 replies; 5+ messages in thread
From: Elijah Newren @ 2008-11-14 20:06 UTC (permalink / raw)
  To: Alan; +Cc: git

On Fri, Nov 14, 2008 at 12:17 PM, Alan <alan@clueserver.org> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can git ignore parts of files
  2008-11-14 19:17 Can git ignore parts of files Alan
  2008-11-14 19:33 ` Francis Galiegue
  2008-11-14 20:06 ` Elijah Newren
@ 2008-11-16  8:37 ` Daniel Barkalow
  2 siblings, 0 replies; 5+ messages in thread
From: Daniel Barkalow @ 2008-11-16  8:37 UTC (permalink / raw)
  To: Alan; +Cc: git

On Fri, 14 Nov 2008, 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?

Try the "clean"/"smudge" filter feature documented in gitattributes(5). 
You should be able to use that to remove the timestamp automatically.

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-11-16  8:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-14 19:17 Can git ignore parts of files Alan
2008-11-14 19:33 ` Francis Galiegue
2008-11-14 19:58   ` Alan
2008-11-14 20:06 ` Elijah Newren
2008-11-16  8:37 ` Daniel Barkalow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox