All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle via buildroot <buildroot@buildroot.org>
To: yegorslists@googlemail.com, buildroot@buildroot.org
Cc: Romain Naour <romain.naour@gmail.com>,
	yann.morin.1998@free.fr, thomas.petazzoni@bootlin.com
Subject: Re: [Buildroot] [PATCH v3] Create a .gitignore file in the CANONICAL_O directory
Date: Wed, 14 Feb 2024 09:19:55 +0100	[thread overview]
Message-ID: <d4e6d31d-ee36-4dec-8357-e9312e9fa271@mind.be> (raw)
In-Reply-To: <20240214071908.297656-1-yegorslists@googlemail.com>



On 14/02/2024 08:19, yegorslists@googlemail.com wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
> 
> This .gitignore file ignores all files in an output directory and
> hence doesn't change the git status.
> 
> The .gitignore file will be only created if $(O) is a subdirectory
> of $(CANONICAL_CURDIR) (aka TOPDIR, but it's only defined later).
> 
> 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>
> ---
> Changes v1 -> v2:
>      - create .gitignore only if $(O) is a subfolder of $(TOPDIR) (Yann
>        E. MORIN)

  I like to create my output directories as subfolders of my BR2_EXTERNAL. 
Currently I have them in the .gitignore of the BR2_EXTERNAL itself, of course, 
but it would be convenient if they got ignored automatically.

  In other words, I'd like to go back to v1 of this patch. There's no reason, 
ever, to not want an output directory to be gitignored.

  Since two maintainers are disagreeing about this, I guess it's up to the other 
maintainers to pipe up and take a decision?


  Regards,
  Arnout

> Changes v2 -> v3:
>      - also support nested subdirectories (Yann E. MORIN)
> 
>   .gitignore | 1 -
>   Makefile   | 7 +++++++
>   2 files changed, 7 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 ac625152c6..aea6abb4d3 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -65,6 +65,13 @@ endif
> 
>   CANONICAL_CURDIR = $(realpath $(CURDIR))
> 
> +# Create a default .gitignore file that ignores everything and doesn't make git
> +# repository "dirty". Perform this action only if $(O) is a subdirectory of
> +# $(CANONICAL_CURDIR) (aka TOPDIR, but it's only defined later).
> +ifeq ($(filter-out $(CANONICAL_CURDIR)/%,$(CANONICAL_O)),)
> +$(file >$(CANONICAL_O)/.gitignore,*)
> +endif
> +
>   REQ_UMASK = 0022
> 
>   # Make sure O= is passed (with its absolute canonical path) everywhere the
> --
> 2.34.1
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2024-02-14  8:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14  7:19 [Buildroot] [PATCH v3] Create a .gitignore file in the CANONICAL_O directory yegorslists--- via buildroot
2024-02-14  8:19 ` Arnout Vandecappelle via buildroot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d4e6d31d-ee36-4dec-8357-e9312e9fa271@mind.be \
    --to=buildroot@buildroot.org \
    --cc=arnout@mind.be \
    --cc=romain.naour@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    --cc=yegorslists@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.