2007-10-16 22:50:49

by David Miller

[permalink] [raw]
Subject: suspicious ALSA empty commit


While scanning over today's updates in Linus's tree, I noticed
the following commit has no changes, and this does not appear
to be intentional.

Someone should check it out.

commit e31b6656a81d6332cdf6af17d38a0573128a6aac
Author: Krzysztof Helt <[email protected]>
Date: Tue Oct 16 14:54:58 2007 +0200

[ALSA] This simplifies and fixes waiting loops of the mce_down()

function after Trent Piepho's patch for AD1848.
It also makes busy_wait() function call not atomic.

Signed-off-by: Krzysztof Helt <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>


2007-10-16 23:27:04

by Linus Torvalds

[permalink] [raw]
Subject: Re: suspicious ALSA empty commit



On Tue, 16 Oct 2007, David Miller wrote:
>
> While scanning over today's updates in Linus's tree, I noticed
> the following commit has no changes, and this does not appear
> to be intentional.

Interesting. You're right, I didn't notice.

Git shouldn't even allow such commits to be generated, although you can
force it by using the low-level functionality (eg using "git commit-tree"
directly for doing things like importing)

Linus

2007-10-16 23:29:31

by David Miller

[permalink] [raw]
Subject: Re: suspicious ALSA empty commit

From: Linus Torvalds <[email protected]>
Date: Tue, 16 Oct 2007 16:26:43 -0700 (PDT)

> Git shouldn't even allow such commits to be generated, although you can
> force it by using the low-level functionality (eg using "git commit-tree"
> directly for doing things like importing)

That would be useful, I think it is a common error when
importing and exporting patches.

2007-10-17 06:12:20

by Jaroslav Kysela

[permalink] [raw]
Subject: Re: suspicious ALSA empty commit

On Tue, 16 Oct 2007, Linus Torvalds wrote:

> On Tue, 16 Oct 2007, David Miller wrote:
> >
> > While scanning over today's updates in Linus's tree, I noticed
> > the following commit has no changes, and this does not appear
> > to be intentional.
>
> Interesting. You're right, I didn't notice.

I didn't notice, too. I've fixed this commit in my git tree.

Linus, please pull from [the linus branch at]:

master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa.git linus
gitweb interface:
http://www.kernel.org/git/?p=linux/kernel/git/perex/alsa.git

Thanks,
Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project

2007-10-17 15:55:49

by Linus Torvalds

[permalink] [raw]
Subject: Re: suspicious ALSA empty commit



On Wed, 17 Oct 2007, Jaroslav Kysela wrote:
>
> I didn't notice, too. I've fixed this commit in my git tree.

More importantly, how did it get there in the first place?

As mentioned, normal git tools will not even *allow* you to create an
empty commit by default! So you must be using some really strange workflow
to get an empty commit, or be triggering a git bug, both of which should
be resolved first.

Linus

2007-10-17 17:39:48

by Jaroslav Kysela

[permalink] [raw]
Subject: Re: suspicious ALSA empty commit

On Wed, 17 Oct 2007, Linus Torvalds wrote:

> On Wed, 17 Oct 2007, Jaroslav Kysela wrote:
> >
> > I didn't notice, too. I've fixed this commit in my git tree.
>
> More importantly, how did it get there in the first place?
>
> As mentioned, normal git tools will not even *allow* you to create an
> empty commit by default! So you must be using some really strange workflow
> to get an empty commit, or be triggering a git bug, both of which should
> be resolved first.

I'm using stg on top of git for merging and easy tree rebasing, but the
version might be old (I'll try upgrade at first):

Stacked GIT 0.12
git version 1.5.0.3

stg import / refresh / pick commands are on way to move patches to linus
branch.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project

2007-10-17 17:59:13

by Linus Torvalds

[permalink] [raw]
Subject: Re: suspicious ALSA empty commit



On Wed, 17 Oct 2007, Jaroslav Kysela wrote:
>
> I'm using stg on top of git for merging and easy tree rebasing, but the
> version might be old (I'll try upgrade at first):

Ahh. That may explain it. stg may well be using the low-level git internal
commands (which *do* allow you to create any kind of commits you want,
including bogus empty ones).

Catalin?

Linus

2007-10-17 20:19:54

by Catalin Marinas

[permalink] [raw]
Subject: Re: suspicious ALSA empty commit

On 17/10/2007, Linus Torvalds <[email protected]> wrote:
> On Wed, 17 Oct 2007, Jaroslav Kysela wrote:
> > I'm using stg on top of git for merging and easy tree rebasing, but the
> > version might be old (I'll try upgrade at first):
>
> Ahh. That may explain it. stg may well be using the low-level git internal
> commands (which *do* allow you to create any kind of commits you want,
> including bogus empty ones).

StGIT indeed creates empty commits (don't think there is anything
wrong with that specific version). Even the most basic command, "stg
new", creates an empty commit which is than filled with changes via
"stg refresh". Pushing patches may result in empty commits if a patch
was merged upstream. Failing import also leaves an empty commit if the
patch doesn't apply cleanly (and there is a .stgit-failed.patch file
left).

The "stg series -e" shows the empty patches and "stg clean" removes
them but I wouldn't do this automatically as empty patches are allowed
in StGIT, though in general for a limited time. I'll try to add
warning/error to commands like "mail" or "export" to make the user
aware.

--
Catalin

2007-10-19 19:19:36

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: suspicious ALSA empty commit

> I'm using stg on top of git for merging and easy tree rebasing, but the
> version might be old (I'll try upgrade at first):
>
> Stacked GIT 0.12
> git version 1.5.0.3
>
> stg import / refresh / pick commands are on way to move patches to linus

with stgit, you should add stg clean on your workflow. This will remove the
empty commits.

--
Cheers,
Mauro