threads / discuss / 8808

Re: why does git perpetually complain about include/asm-blackfin/macros.h?

Subject: Re: why does git perpetually complain about include/asm-blackfin/macros.h?

## tl;dr

14 messages between Jul 2, 2007 and Jul 14, 2007.

replies: 13people: 8as markdown or json

Jeff Garzik· Jul 2, 2007, 12:29 UTC · lore
Robert P. J. Day wrote:
Show 7 quoted lines
>   for the umpteenth time, after doing a pull, i see this:
> 
> $ git diff
> diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h
> deleted file mode 100644
> index e69de29..0000000
> $
I have the same problem.  git 1.5.0.6 on Fedora Core 5 or 6.
I even tried a completely fresh clone, but the problem still appears.
	Jeff
Jesper Juhl· Jul 2, 2007, 13:58 UTC · re: Jeff Garzik · lore
On 02/07/07, Jeff Garzik <jeff@garzik.org> wrote:
Show 13 quoted lines
> Robert P. J. Day wrote:
> >   for the umpteenth time, after doing a pull, i see this:
> >
> > $ git diff
> > diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h
> > deleted file mode 100644
> > index e69de29..0000000
> > $
>
> I have the same problem.  git 1.5.0.6 on Fedora Core 5 or 6.
>
> I even tried a completely fresh clone, but the problem still appears.
>

I've seen that as well, but in my case doing a $ git reset --hard master fixed it.

-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html
Jeff Garzik· Jul 2, 2007, 14:10 UTC · re: Jesper Juhl · lore
Jesper Juhl wrote:
Show 18 quoted lines
> On 02/07/07, Jeff Garzik <jeff@garzik.org> wrote:
>> Robert P. J. Day wrote:
>> >   for the umpteenth time, after doing a pull, i see this:
>> >
>> > $ git diff
>> > diff --git a/include/asm-blackfin/macros.h 
>> b/include/asm-blackfin/macros.h
>> > deleted file mode 100644
>> > index e69de29..0000000
>> > $
>>
>> I have the same problem.  git 1.5.0.6 on Fedora Core 5 or 6.
>>
>> I even tried a completely fresh clone, but the problem still appears.
>>
> I've seen that as well, but in my case doing a
> $ git reset --hard master
> fixed it.
Sure.  git checkout -f fixes it too.
But then it reappears the every time I switch branches.
	Jeff
Robert P. J. Day· Jul 2, 2007, 14:22 UTC · re: Jeff Garzik · lore
On Mon, 2 Jul 2007, Jeff Garzik wrote:
Show 23 quoted lines
> Jesper Juhl wrote:
> > On 02/07/07, Jeff Garzik <jeff@garzik.org> wrote:
> > > Robert P. J. Day wrote:
> > > >   for the umpteenth time, after doing a pull, i see this:
> > > >
> > > > $ git diff
> > > > diff --git a/include/asm-blackfin/macros.h
> > > b/include/asm-blackfin/macros.h
> > > > deleted file mode 100644
> > > > index e69de29..0000000
> > > > $
> > >
> > > I have the same problem.  git 1.5.0.6 on Fedora Core 5 or 6.
> > >
> > > I even tried a completely fresh clone, but the problem still appears.
> > >
> > I've seen that as well, but in my case doing a
> > $ git reset --hard master
> > fixed it.
>
> Sure.  git checkout -f fixes it too.
>
> But then it reappears the every time I switch branches.

same here -- checkout fixes it, but back it comes after the next pull. not fatal -- just annoying.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
Alex Riesen· Jul 2, 2007, 14:22 UTC · re: Jeff Garzik · lore
On 7/2/07, Jeff Garzik <jeff@garzik.org> wrote:
Show 24 quoted lines
> Jesper Juhl wrote:
> > On 02/07/07, Jeff Garzik <jeff@garzik.org> wrote:
> >> Robert P. J. Day wrote:
> >> >   for the umpteenth time, after doing a pull, i see this:
> >> >
> >> > $ git diff
> >> > diff --git a/include/asm-blackfin/macros.h
> >> b/include/asm-blackfin/macros.h
> >> > deleted file mode 100644
> >> > index e69de29..0000000
> >> > $
> >>
> >> I have the same problem.  git 1.5.0.6 on Fedora Core 5 or 6.
> >>
> >> I even tried a completely fresh clone, but the problem still appears.
> >>
> > I've seen that as well, but in my case doing a
> > $ git reset --hard master
> > fixed it.
>
> Sure.  git checkout -f fixes it too.
>
> But then it reappears the every time I switch branches.
>

Do some of your branches miss the commit by which it was removed? (It was removed in df30b1171714bbf0e55ffe02138be4b8447e4235) Than it will reappear every time you switch to a branch which still has the file.

It is somewhat unclear what "reappear" means, though: do you mean in your working directory (that's what I explained above) or do you mean: on the commit pointed by HEAD?

In that second case I can only suspect that all your branches point at the same commit, which is just before the one the file was removed in...

Alex Riesen· Jul 2, 2007, 14:25 UTC · re: Alex Riesen · lore
On 7/2/07, Alex Riesen <raa.lkml@gmail.com> wrote:
> In that second case I can only suspect that all your branches point
> at the same commit, which is just before the one the file was removed
> in...
_Not_ the same. Just some commit before the file was removed, of course.
Marco Roeland· Jul 2, 2007, 14:29 UTC · re: Alex Riesen · lore
On Monday July 2nd 2007 at 16:22 Alex Riesen wrote:
> Do some of your branches miss the commit by which it was removed?
> (It was removed in df30b1171714bbf0e55ffe02138be4b8447e4235)
> Than it will reappear every time you switch to a branch which still has
> the file.

The problem is that this commit didn't delete the file, but truncated it to zero size. How it got to be like that is another matter. Within the kernel zero sized files are not supposed to be there, by widely accepted practice. So lots of tools assume they should delete them!

-- 
Marco Roeland
Marco Roeland· Jul 2, 2007, 15:09 UTC · re: Marco Roeland · lore

[PATCH] Blackfin arch: include/asm-blackfin/macros.h die die die

This file accidentally got truncated instead of deleted in commit df30b11. Doing a "make distclean" or "make mrproper" deletes this file because of its zero size. Git then sees this as an uncommitted local change.

Signed-off-by: Marco Roeland <marco.roeland@xs4all.nl>
---
 0 files changed, 0 insertions(+), 0 deletions(-)
 delete mode 100644 include/asm-blackfin/macros.h
diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h
deleted file mode 100644
index e69de29..0000000
-- 
1.5.2.2.1451.gb0e5e
Bryan Wu· Jul 3, 2007, 00:39 UTC · re: Marco Roeland · lore

Re: [PATCH] Blackfin arch: include/asm-blackfin/macros.h die die die

On Mon, 2007-07-02 at 17:09 +0200, Marco Roeland wrote:
Show 12 quoted lines
> This file accidentally got truncated instead of deleted in commit df30b11.
> Doing a "make distclean" or "make mrproper" deletes this file because of
> its zero size. Git then sees this as an uncommitted local change.
> 
> Signed-off-by: Marco Roeland <marco.roeland@xs4all.nl>
> ---
>  0 files changed, 0 insertions(+), 0 deletions(-)
>  delete mode 100644 include/asm-blackfin/macros.h
> 
> diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h
> deleted file mode 100644
> index e69de29..0000000

Thanks already in blackfin-2.6.git tree for Linus pull Acked by: Bryan Wu <bryan.wu@analog.com>

Jeff Garzik· Jul 2, 2007, 14:37 UTC · re: Alex Riesen · lore
Alex Riesen wrote:
> Do some of your branches miss the commit by which it was removed?
git-clone followed by git-checkout master recreates the problem.

But to answer your question directly, I rebase, so they absolutely do not miss any commits.

> It is somewhat unclear what "reappear" means, though: do you mean

Attempts to give you precise output to answer your question yielded a data point, the kernel's "make distclean" causes this:

[jgarzik@pretzel linux-2.6]$ make distclean && git checkout master && git diff HEAD D include/asm-blackfin/macros.h Switched to branch "master"

diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h
deleted file mode 100644
index e69de29..0000000

[jgarzik@pretzel linux-2.6]$ git checkout -f

[jgarzik@pretzel linux-2.6]$ make distclean && git checkout master && 
git diff HEAD
D       include/asm-blackfin/macros.h
Switched to branch "master"
diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h
deleted file mode 100644
index e69de29..0000000

[jgarzik@pretzel linux-2.6]$ git checkout -f

[jgarzik@pretzel linux-2.6]$ git checkout master && git diff 
HEADSwitched to branch "master"

[jgarzik@pretzel linux-2.6]$ git checkout master && git diff HEAD
Switched to branch "master"

[jgarzik@pretzel linux-2.6]$


So, not a git problem but a kernel Makefile problem.  Sorry for the git 
noise.

	Jeff
Sam Ravnborg· Jul 14, 2007, 07:45 UTC · re: Jeff Garzik · lore
On Mon, Jul 02, 2007 at 10:37:28AM -0400, Jeff Garzik wrote:
Show 45 quoted lines
> Alex Riesen wrote:
> >Do some of your branches miss the commit by which it was removed?
> 
> git-clone followed by git-checkout master recreates the problem.
> 
> But to answer your question directly, I rebase, so they absolutely do 
> not miss any commits.
> 
> 
> >It is somewhat unclear what "reappear" means, though: do you mean
> 
> Attempts to give you precise output to answer your question yielded a 
> data point, the kernel's "make distclean" causes this:
> 
> [jgarzik@pretzel linux-2.6]$ make distclean && git checkout master && 
> git diff HEAD
> D       include/asm-blackfin/macros.h
> Switched to branch "master"
> diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h
> deleted file mode 100644
> index e69de29..0000000
> 
> [jgarzik@pretzel linux-2.6]$ git checkout -f
> 
> [jgarzik@pretzel linux-2.6]$ make distclean && git checkout master && 
> git diff HEAD
> D       include/asm-blackfin/macros.h
> Switched to branch "master"
> diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h
> deleted file mode 100644
> index e69de29..0000000
> 
> [jgarzik@pretzel linux-2.6]$ git checkout -f
> 
> [jgarzik@pretzel linux-2.6]$ git checkout master && git diff 
> HEADSwitched to branch "master"
> 
> [jgarzik@pretzel linux-2.6]$ git checkout master && git diff HEAD
> Switched to branch "master"
> 
> [jgarzik@pretzel linux-2.6]$
> 
> 
> So, not a git problem but a kernel Makefile problem.  Sorry for the git 
> noise.

distclean on purpose delete zero size files. And the kernel tree shall not contain such files - if it does it is a bug.

So I do not see a 'problem' with the kernel makefile but instead a problem with the kernel tree wich is about to be fixed.

Agree?
	Sam
Marco Roeland· Jul 2, 2007, 14:24 UTC · re: Jesper Juhl · lore
On Monday July 2nd 2007 at 15:58 Jesper Juhl wrote:
Show 6 quoted lines
> [obnoxious zero sized file include/asm-blackfin/macros.h that gets
>  zapped by toolchains and resurrected again by git]
>
> I've seen that as well, but in my case doing a
> $ git reset --hard master
> fixed it.

Dangerous, as it may overwrite local changes you have! A simple "git checkout include/asm-blackfin/macros.h" is much safer in this case.

In git commit df30b11 this file got redundant. Perhaps because a normal patch was applied, instead of with git, the file didn't get deleted from the repository but truncated to size zero. Not strictly wrong perse, but for the Linux repository highly unusual (and the only one at that).

Your toolchain perhaps deletes files with zero size after cleaning up or something. Git then notices that you deleted this file.

Perhaps someone can apply something like the following to finally fix this up:

commit 7d98740800f3d9ad2428afa8c677be9573a51b7b
Author: Marco Roeland <marco.roeland@xs4all.nl>
Date:   Mon Jul 2 16:19:49 2007 +0200
    Blackfin arch: remove zero-sized include/asm-blackfin/macros.h
    
    This file accidentally got truncated instead of deleted in commit df30b11.
    
    Signed-off-by: Marco Roeland <marco.roeland@xs4all.nl>
diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h
deleted file mode 100644
index e69de29..0000000
Bryan Wu· Jul 3, 2007, 00:28 UTC · re: Marco Roeland · lore
On Mon, 2007-07-02 at 16:24 +0200, Marco Roeland wrote:
Show 37 quoted lines
> On Monday July 2nd 2007 at 15:58 Jesper Juhl wrote:
> 
> > [obnoxious zero sized file include/asm-blackfin/macros.h that gets
> >  zapped by toolchains and resurrected again by git]
> >
> > I've seen that as well, but in my case doing a
> > $ git reset --hard master
> > fixed it.
> 
> Dangerous, as it may overwrite local changes you have! A simple "git
> checkout include/asm-blackfin/macros.h" is much safer in this case.
> 
> In git commit df30b11 this file got redundant. Perhaps because a normal
> patch was applied, instead of with git, the file didn't get deleted from
> the repository but truncated to size zero. Not strictly wrong perse, but
> for the Linux repository highly unusual (and the only one at that).
> 
> Your toolchain perhaps deletes files with zero size after cleaning up or
> something. Git then notices that you deleted this file.
> 
> Perhaps someone can apply something like the following to finally fix
> this up:
> 
> commit 7d98740800f3d9ad2428afa8c677be9573a51b7b
> Author: Marco Roeland <marco.roeland@xs4all.nl>
> Date:   Mon Jul 2 16:19:49 2007 +0200
> 
>     Blackfin arch: remove zero-sized include/asm-blackfin/macros.h
>     
>     This file accidentally got truncated instead of deleted in commit df30b11.
>     
>     Signed-off-by: Marco Roeland <marco.roeland@xs4all.nl>
> 
> diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h
> deleted file mode 100644
> index e69de29..0000000
> -
Thanks, Applied to the blackfin-2.6.git tree for Linus pull.
- Bryan
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Torvalds· Jul 2, 2007, 15:36 UTC · re: Jeff Garzik · lore
On Mon, 2 Jul 2007, Jeff Garzik wrote:
Show 12 quoted lines
> Robert P. J. Day wrote:
> >   for the umpteenth time, after doing a pull, i see this:
> > 
> > $ git diff
> > diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h
> > deleted file mode 100644
> > index e69de29..0000000
> > $
> 
> I have the same problem.  git 1.5.0.6 on Fedora Core 5 or 6.
> 
> I even tried a completely fresh clone, but the problem still appears.

Git complains for a very simple reason: that file is an empty file, and "make clean" removes all zero-sized files.

So whenever anybody does a "make clean" (maybe it's "make distclean", I forget), you will have removed the empty file, and git will show it as a diff.

We probably should just remove the file from the kernel archive.
		Linus

← back to recent threads