Skip to content
Snippets Groups Projects
Commit 2df0c02d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

x86 boot build: make git ignore stale 'tools' directory


We've had this before: when we remove infrastructure to generate files,
the old stale build artifacts still remain in-tree.  And when the
infrastructure to generate them is gone, so is the gitignore file for
those build artifacts.

End result: git will see the old generated files, and people will
mistakenly commit them.  That's what happened with the 'genheaders' file
not that long ago (see commit 04a3389b "Remove stale generated
'genheaders' file").

This time it's commit 9c54baab ("x86/boot: Drop CRC-32 checksum and
the build tool that generates it") that removed the 'build' file from
the arch/x86/boot/tools/ subdirectory, and removed the .gitignore file
too (because the whole subdirectory is gone).

And as a result, if you don't do a 'git clean -dqfx' or similar to clean
up your tree, 'git status' will say

  Untracked files:
    (use "git add <file>..." to include in what will be committed)
	arch/x86/boot/tools/

and some hapless sleep-deprived developer will inevitably decide that
that means that they need to 'git add' that directory.  Which would
bring back some stale generated file that we most definitely do not want
in the tree.

So when removing directories that had special .gitignore patterns, make
sure to add a new gitignore entry in the parent directory for the no
longer existing subdirectory.

It will avoid mistakes.

Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Fixes: 9c54baab ("x86/boot: Drop CRC-32 checksum and the build tool that generates it")
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 001a3a0c
No related branches found
No related tags found
No related merge requests found
......@@ -12,3 +12,4 @@ fdimage
mtools.conf
image.iso
hdimage
tools/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment