Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Yegor Yefremov <yegorslists@googlemail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] Create a .gitignore file in the CANONICAL_O directory
Date: Mon, 12 Feb 2024 21:07:12 +0100	[thread overview]
Message-ID: <Zcp6cCeYLfRu95BC@landeda> (raw)
In-Reply-To: <CAGm1_kthjzi2yHBeo9uBd_ojW2FjY-i4USEgUV0QHL5G0=8Z5w@mail.gmail.com>

Yegor, All,

On 2024-02-12 10:00 +0100, Yegor Yefremov via buildroot spake thusly:
> On Tue, Feb 6, 2024 at 2:37 PM Arnout Vandecappelle <arnout@mind.be> wrote:
> > On 06/02/2024 14:30, Yann E. MORIN wrote:
> > > On 2024-02-06 14:20 +0100, yegorslists--- via buildroot spake thusly:
> > >> From: Yegor Yefremov <yegorslists@googlemail.com>
> > >> This .gitignore file ignores all files in an output directory and
> > >> hence doesn't change the git status.
> > > What are you trying to achieve with this that does not work currently?
> >   I you do `make O=output-test-mypkg` (which I do quite a lot), that output
> > directory doesn't get ignored by git. We could ignore output* but maybe you name
> > the output directory o-foo or something.
> >
> >   Putting a .gitignore in a generated directory is a very elegant solution for
> > that. It is used by e.g. virtualenv, pytest, and a load of other applications
> > that generate output in a directory.
> >
> >   Since the .gitignore is created in the output directory, it is no longer
> > necessary to put output/ in the .gitignore file.
> >   All of the above could be put in the commit message, of course, but for me
> > Yegor's commit message was sufficiently clear :-)
> Were we able to convince you?

I now understand the purpose. Saying I'm convinced is another stride.

In my case, I have all my output directories outside of the buildroot
tree. Having a .gitignore in there would be totally useless and
spurious, and would get caught by my (superficial) tests that no unknown
files gets created outside the build/ target/ and such dirs for example.

So there are pros and cons either ways...

Maybe just create .gitignore only if $(O) a sub-dir of $(TOPDIR) ?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-02-12 20:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06 13:20 [Buildroot] [PATCH] Create a .gitignore file in the CANONICAL_O directory yegorslists--- via buildroot
2024-02-06 13:30 ` Yann E. MORIN
2024-02-06 13:37   ` Arnout Vandecappelle via buildroot
2024-02-12  9:00     ` Yegor Yefremov via buildroot
2024-02-12 20:07       ` Yann E. MORIN [this message]
2024-02-12 21:51         ` Arnout Vandecappelle via buildroot

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=Zcp6cCeYLfRu95BC@landeda \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox