Re: [GIT PULL] Devicetree updates for v5.12

From: Rob Herring
Date: Mon Feb 22 2021 - 15:24:57 EST


On Mon, Feb 22, 2021 at 10:52:09AM -0800, Linus Torvalds wrote:
> On Mon, Feb 22, 2021 at 9:35 AM Rob Herring <robh@xxxxxxxxxx> wrote:
> >
> > Please pull DT updates for v5.12.
>
> Ugh.
>
> This causes "git status" to be unhappy, because there's a new
> generated file (scripts/dtc/fdtoverlay) without a gitignore entry.

Sorry about that.

> This was added by commit 79edff12060f ("scripts/dtc: Update to
> upstream version v1.6.0-51-g183df9e9c2b9"), and then enabled in commit
> 0da6bcd9fcc0 ("scripts: dtc: Build fdtoverlay tool"). But it was
> already referenced before it was even added (by commit b775f49fbc8b:
> "scripts: dtc: Fetch fdtoverlay.c from external DTC project", which
> didn't actually fetch that thing at all!)

Commit b775f49fbc8b is updating the update script we run that does the
copy. The script takes just the pieces we need from the dtc upstream.
Commit 79edff12060f is the result of running the script.

> And that commit 79edff12060f is all kinds of strange anyway, in that
> it *claims* to have taken some (other) gitignore updates from the
> upstream dtc code, but it very clearly does no such thing.

Upstream dtc has its own gitignore which we don't copy over, so the
gitignore references are for upstream commits. I suppose we could just
take upstream's gitignore, but it has a lot of crap we don't need.

> So I have to say - that whole thing was done very very badly. Actively
> incorrect commit messages, complete mess about when things were added,
> and the end result isn't great.
>
> Sadly, I only noticed after I had pulled and pushed out.
>
> Please fix. Not just the current mess with the incomplete .gitignore
> file, but the whole clearly broken workflow.

A fix is below.

I've added a note so hopefully any future updates won't forget
gitignore. I am wondering if we could automate this as it seems to be
somewhat frequent problem. Some sort of check that ensures every
hostprogs entry has a gitignore entry.

Rob

8<---------------------------------------------------------------------