* [PATCH] gitignore: ignore /build
@ 2025-10-17 10:22 Jonas Rebmann
2025-10-20 9:44 ` Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Jonas Rebmann @ 2025-10-17 10:22 UTC (permalink / raw)
To: Sascha Hauer, BAREBOX; +Cc: Jonas Rebmann
Documentation such as Documentation/boards/kvx.rst and tooling such as
conftest.py suggests /build is a good choice for build output directory.
Therefore, include it in .gitignore.
Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 98bb4dac89..32d54b8fbe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,6 +53,7 @@ policy-list
/TAGS
/barebox*
/System.map
+/build
#
# git files that we don't want to ignore even it they are dot-files
---
base-commit: 8defba1d0ab1aef9dd5d57710e18d0d02e2c48e2
change-id: 20251017-gitignore-build-d90cb643b130
Best regards,
--
Jonas Rebmann <jre@pengutronix.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gitignore: ignore /build
2025-10-17 10:22 [PATCH] gitignore: ignore /build Jonas Rebmann
@ 2025-10-20 9:44 ` Sascha Hauer
2025-10-20 12:36 ` Jonas Rebmann
0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2025-10-20 9:44 UTC (permalink / raw)
To: Jonas Rebmann; +Cc: BAREBOX
On Fri, Oct 17, 2025 at 12:22:13PM +0200, Jonas Rebmann wrote:
> Documentation such as Documentation/boards/kvx.rst and tooling such as
> conftest.py suggests /build is a good choice for build output directory.
>
> Therefore, include it in .gitignore.
>
> Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
> ---
> .gitignore | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/.gitignore b/.gitignore
> index 98bb4dac89..32d54b8fbe 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -53,6 +53,7 @@ policy-list
> /TAGS
> /barebox*
> /System.map
> +/build
I have nothing against adding this here. I just wondered why my build
directories don't show up in git status and realized the barebox
toplevel Makefile already creates a .gitignore file in the build
directory:
{ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
Any idea why this doesn't happen in your case?
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gitignore: ignore /build
2025-10-20 9:44 ` Sascha Hauer
@ 2025-10-20 12:36 ` Jonas Rebmann
2025-10-20 13:01 ` Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Jonas Rebmann @ 2025-10-20 12:36 UTC (permalink / raw)
To: Sascha Hauer; +Cc: BAREBOX
Hi Sascha,
On 2025-10-20 11:44, Sascha Hauer wrote:
> On Fri, Oct 17, 2025 at 12:22:13PM +0200, Jonas Rebmann wrote:
>> Documentation such as Documentation/boards/kvx.rst and tooling such as
>> conftest.py suggests /build is a good choice for build output directory.
>>
>> Therefore, include it in .gitignore.
>>
>> Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
>> ---
>> .gitignore | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/.gitignore b/.gitignore
>> index 98bb4dac89..32d54b8fbe 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -53,6 +53,7 @@ policy-list
>> /TAGS
>> /barebox*
>> /System.map
>> +/build
>
> I have nothing against adding this here. I just wondered why my build
> directories don't show up in git status and realized the barebox
> toplevel Makefile already creates a .gitignore file in the build
> directory:
>
> { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
>
> Any idea why this doesn't happen in your case?
Oh, I was not aware of this.
In my case, "build" is a symlink to outside the barebox sourcetree. The
build/.gitignore is created with this content but it isn't respected by
git because it isn't in the sourcetree. This is also why I added
'/build' to .gitignore and not '/build/': To also ignore it when it's a
symlink.
Regards,
Jonas
--
Pengutronix e.K. | Jonas Rebmann |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gitignore: ignore /build
2025-10-20 12:36 ` Jonas Rebmann
@ 2025-10-20 13:01 ` Sascha Hauer
0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2025-10-20 13:01 UTC (permalink / raw)
To: Jonas Rebmann; +Cc: BAREBOX
On Mon, Oct 20, 2025 at 02:36:08PM +0200, Jonas Rebmann wrote:
> Hi Sascha,
>
> On 2025-10-20 11:44, Sascha Hauer wrote:
> > On Fri, Oct 17, 2025 at 12:22:13PM +0200, Jonas Rebmann wrote:
> > > Documentation such as Documentation/boards/kvx.rst and tooling such as
> > > conftest.py suggests /build is a good choice for build output directory.
> > >
> > > Therefore, include it in .gitignore.
> > >
> > > Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
> > > ---
> > > .gitignore | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/.gitignore b/.gitignore
> > > index 98bb4dac89..32d54b8fbe 100644
> > > --- a/.gitignore
> > > +++ b/.gitignore
> > > @@ -53,6 +53,7 @@ policy-list
> > > /TAGS
> > > /barebox*
> > > /System.map
> > > +/build
> >
> > I have nothing against adding this here. I just wondered why my build
> > directories don't show up in git status and realized the barebox
> > toplevel Makefile already creates a .gitignore file in the build
> > directory:
> >
> > { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
> >
> > Any idea why this doesn't happen in your case?
>
> Oh, I was not aware of this.
>
> In my case, "build" is a symlink to outside the barebox sourcetree. The
> build/.gitignore is created with this content but it isn't respected by
> git because it isn't in the sourcetree. This is also why I added
> '/build' to .gitignore and not '/build/': To also ignore it when it's a
> symlink.
Ah, ok, so the symlink is the problem. YOCTO uses a build symlink as
well when used with devtool modify --no-extract. With YOCTO we also get
oe-logs and oe-workdir symlinks, so maybe we should git-ignore these as
well.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-20 13:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-17 10:22 [PATCH] gitignore: ignore /build Jonas Rebmann
2025-10-20 9:44 ` Sascha Hauer
2025-10-20 12:36 ` Jonas Rebmann
2025-10-20 13:01 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox