Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4] Create a .gitignore file in the CANONICAL_O directory
@ 2024-06-26 16:49 Brandon Maier via buildroot
  2024-07-15  8:30 ` Arnout Vandecappelle via buildroot
  2024-07-22 23:49 ` Bryan Brattlof via buildroot
  0 siblings, 2 replies; 7+ messages in thread
From: Brandon Maier via buildroot @ 2024-06-26 16:49 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni, Romain Naour, Yann E. MORIN

From: Yegor Yefremov <yegorslists@googlemail.com>

This .gitignore file ignores all files in an output directory and
hence doesn't change the git status.

Remove "/output" entry from the main .gitignore file as it is already
handled by this general approach.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
This is a resend of the v1 of this patch from Yegor Yefremov, as the
original patch series seems to have stalled.

I'm not familiar with the process for resending someone else's patches,
so let me know if I should redo anything.

I find having the output folders gitignore'd is useful as some newer
tools like fd-find and ripgrep will automatically respect gitignore.
Otherwise the output directories are huge and quick searches can
suddenly take a long time if I have created a few.
---
Changes v2:
- create .gitignore only if $(O) is a subfolder of $(TOPDIR) (Yann E.
  MORIN)
- Link to v1: https://patchwork.ozlabs.org/project/buildroot/patch/20240206132051.2838897-1-yegorslists@googlemail.com/

Changes v3:
- also support nested subdirectories (Yann E. MORIN)
- Link to v2: https://patchwork.ozlabs.org/project/buildroot/patch/20240213143025.274988-1-yegorslists@googlemail.com/

Changes v4:
- Revert to v1 of code (Arnout Vandecappelle)
- Link to v3: https://patchwork.ozlabs.org/project/buildroot/patch/20240214071908.297656-1-yegorslists@googlemail.com/
---
 .gitignore | 1 -
 Makefile   | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index bb02d9f572..14b7ca5040 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
-/output
 /dl
 /.auto.deps
 /.config.cmd
diff --git a/Makefile b/Makefile
index 138cfc5f8d..3d930d64a9 100644
--- a/Makefile
+++ b/Makefile
@@ -63,6 +63,9 @@ ifneq ($(findstring @,$(CANONICAL_O)),)
 $(error The build directory can not contain a '@')
 endif
 
+# Create a default .gitignore file that ignores everything
+$(shell echo "*" > "$(CANONICAL_O)/.gitignore")
+
 CANONICAL_CURDIR = $(realpath $(CURDIR))
 
 REQ_UMASK = 0022

---
base-commit: 4f1b7d0ef00af527f6a5c1fcfd18ce204a7d78e8
change-id: 20240626-gitignore-output-new-5b47c23fde37

Best regards,
-- 
Brandon Maier <brandon.maier@collins.com>

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-07-24 21:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-26 16:49 [Buildroot] [PATCH v4] Create a .gitignore file in the CANONICAL_O directory Brandon Maier via buildroot
2024-07-15  8:30 ` Arnout Vandecappelle via buildroot
2024-07-22 23:49 ` Bryan Brattlof via buildroot
2024-07-23  8:08   ` Thomas Petazzoni via buildroot
2024-07-23 10:23   ` Marcus Hoffmann via buildroot
2024-07-23 19:31     ` Bryan Brattlof via buildroot
2024-07-24 21:26   ` Brandon Maier via buildroot

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