* [PATCH] .gitignore: include common build sub-directories
@ 2020-04-13 16:29 Alex Bennée
2020-04-13 18:26 ` Eric Blake
2020-04-14 15:06 ` Richard Henderson
0 siblings, 2 replies; 11+ messages in thread
From: Alex Bennée @ 2020-04-13 16:29 UTC (permalink / raw)
To: qemu-devel; +Cc: Alex Bennée
As out-of-tree builds become more common (or rather building in a
subdir) we can add a lot of load to "git ls-files" as it hunts down
sub-directories that are irrelevant to the source tree. This is
especially annoying if you have a prompt that attempts to summarise
the current git status on command completion.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index 0c5af83aa74..7757dc08a08 100644
--- a/.gitignore
+++ b/.gitignore
@@ -141,6 +141,8 @@ cscope.*
tags
TAGS
docker-src.*
+build
+builds
*~
*.ast_raw
*.depend_raw
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] .gitignore: include common build sub-directories
2020-04-13 16:29 [PATCH] .gitignore: include common build sub-directories Alex Bennée
@ 2020-04-13 18:26 ` Eric Blake
2020-04-13 21:32 ` Alex Bennée
2020-04-14 15:06 ` Richard Henderson
1 sibling, 1 reply; 11+ messages in thread
From: Eric Blake @ 2020-04-13 18:26 UTC (permalink / raw)
To: Alex Bennée, qemu-devel
On 4/13/20 11:29 AM, Alex Bennée wrote:
> As out-of-tree builds become more common (or rather building in a
> subdir) we can add a lot of load to "git ls-files" as it hunts down
> sub-directories that are irrelevant to the source tree. This is
> especially annoying if you have a prompt that attempts to summarise
> the current git status on command completion.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> .gitignore | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/.gitignore b/.gitignore
> index 0c5af83aa74..7757dc08a08 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -141,6 +141,8 @@ cscope.*
> tags
> TAGS
> docker-src.*
> +build
> +builds
Would 'build-*' be worth adding as well?
The idea makes sense to me (as I've already done the same in my
./git/info/exclude locally),
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] .gitignore: include common build sub-directories
2020-04-13 18:26 ` Eric Blake
@ 2020-04-13 21:32 ` Alex Bennée
2020-04-13 21:42 ` Eric Blake
0 siblings, 1 reply; 11+ messages in thread
From: Alex Bennée @ 2020-04-13 21:32 UTC (permalink / raw)
To: Eric Blake; +Cc: qemu-devel
Eric Blake <eblake@redhat.com> writes:
> On 4/13/20 11:29 AM, Alex Bennée wrote:
>> As out-of-tree builds become more common (or rather building in a
>> subdir) we can add a lot of load to "git ls-files" as it hunts down
>> sub-directories that are irrelevant to the source tree. This is
>> especially annoying if you have a prompt that attempts to summarise
>> the current git status on command completion.
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>> .gitignore | 2 ++
>> 1 file changed, 2 insertions(+)
>> diff --git a/.gitignore b/.gitignore
>> index 0c5af83aa74..7757dc08a08 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -141,6 +141,8 @@ cscope.*
>> tags
>> TAGS
>> docker-src.*
>> +build
>> +builds
>
> Would 'build-*' be worth adding as well?
Sure - I'll add it to v2.
>
> The idea makes sense to me (as I've already done the same in my
> ./git/info/exclude locally),
> Reviewed-by: Eric Blake <eblake@redhat.com>
--
Alex Bennée
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] .gitignore: include common build sub-directories
2020-04-13 21:32 ` Alex Bennée
@ 2020-04-13 21:42 ` Eric Blake
2020-04-13 21:45 ` Philippe Mathieu-Daudé
2020-04-14 8:00 ` Markus Armbruster
0 siblings, 2 replies; 11+ messages in thread
From: Eric Blake @ 2020-04-13 21:42 UTC (permalink / raw)
To: Alex Bennée; +Cc: qemu-devel
On 4/13/20 4:32 PM, Alex Bennée wrote:
>
> Eric Blake <eblake@redhat.com> writes:
>
>> On 4/13/20 11:29 AM, Alex Bennée wrote:
>>> As out-of-tree builds become more common (or rather building in a
>>> subdir) we can add a lot of load to "git ls-files" as it hunts down
>>> sub-directories that are irrelevant to the source tree. This is
>>> especially annoying if you have a prompt that attempts to summarise
>>> the current git status on command completion.
>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>> ---
>>> .gitignore | 2 ++
>>> 1 file changed, 2 insertions(+)
>>> diff --git a/.gitignore b/.gitignore
>>> index 0c5af83aa74..7757dc08a08 100644
>>> --- a/.gitignore
>>> +++ b/.gitignore
>>> @@ -141,6 +141,8 @@ cscope.*
>>> tags
>>> TAGS
>>> docker-src.*
>>> +build
>>> +builds
>>
>> Would 'build-*' be worth adding as well?
>
> Sure - I'll add it to v2.
Or even consolidate it into a single pattern: build* (which would allow
'build', 'builds', 'build1', 'build23', 'build-fedora', 'build-bug1234',
...)
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] .gitignore: include common build sub-directories
2020-04-13 21:42 ` Eric Blake
@ 2020-04-13 21:45 ` Philippe Mathieu-Daudé
2020-04-14 8:00 ` Markus Armbruster
1 sibling, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-04-13 21:45 UTC (permalink / raw)
To: Eric Blake, Alex Bennée; +Cc: qemu-devel
On 4/13/20 11:42 PM, Eric Blake wrote:
> On 4/13/20 4:32 PM, Alex Bennée wrote:
>>
>> Eric Blake <eblake@redhat.com> writes:
>>
>>> On 4/13/20 11:29 AM, Alex Bennée wrote:
>>>> As out-of-tree builds become more common (or rather building in a
>>>> subdir) we can add a lot of load to "git ls-files" as it hunts down
>>>> sub-directories that are irrelevant to the source tree. This is
>>>> especially annoying if you have a prompt that attempts to summarise
>>>> the current git status on command completion.
>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>> ---
>>>> .gitignore | 2 ++
>>>> 1 file changed, 2 insertions(+)
>>>> diff --git a/.gitignore b/.gitignore
>>>> index 0c5af83aa74..7757dc08a08 100644
>>>> --- a/.gitignore
>>>> +++ b/.gitignore
>>>> @@ -141,6 +141,8 @@ cscope.*
>>>> tags
>>>> TAGS
>>>> docker-src.*
>>>> +build
>>>> +builds
>>>
>>> Would 'build-*' be worth adding as well?
>>
>> Sure - I'll add it to v2.
>
> Or even consolidate it into a single pattern: build* (which would allow
> 'build', 'builds', 'build1', 'build23', 'build-fedora', 'build-bug1234',
> ...)
Using 'build*':
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] .gitignore: include common build sub-directories
2020-04-13 21:42 ` Eric Blake
2020-04-13 21:45 ` Philippe Mathieu-Daudé
@ 2020-04-14 8:00 ` Markus Armbruster
2020-04-14 8:47 ` Alex Bennée
1 sibling, 1 reply; 11+ messages in thread
From: Markus Armbruster @ 2020-04-14 8:00 UTC (permalink / raw)
To: Eric Blake; +Cc: Alex Bennée, qemu-devel
Eric Blake <eblake@redhat.com> writes:
> On 4/13/20 4:32 PM, Alex Bennée wrote:
>>
>> Eric Blake <eblake@redhat.com> writes:
>>
>>> On 4/13/20 11:29 AM, Alex Bennée wrote:
>>>> As out-of-tree builds become more common (or rather building in a
>>>> subdir) we can add a lot of load to "git ls-files" as it hunts down
>>>> sub-directories that are irrelevant to the source tree. This is
>>>> especially annoying if you have a prompt that attempts to summarise
>>>> the current git status on command completion.
>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>> ---
>>>> .gitignore | 2 ++
>>>> 1 file changed, 2 insertions(+)
>>>> diff --git a/.gitignore b/.gitignore
>>>> index 0c5af83aa74..7757dc08a08 100644
>>>> --- a/.gitignore
>>>> +++ b/.gitignore
>>>> @@ -141,6 +141,8 @@ cscope.*
>>>> tags
>>>> TAGS
>>>> docker-src.*
>>>> +build
>>>> +builds
>>>
>>> Would 'build-*' be worth adding as well?
>>
>> Sure - I'll add it to v2.
>
> Or even consolidate it into a single pattern: build* (which would
> allow 'build', 'builds', 'build1', 'build23', 'build-fedora',
> 'build-bug1234', ...)
The looser the pattern, the higher the risk of unwanted matches.
Would be less of an issue if we had a cleaner source root directory.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] .gitignore: include common build sub-directories
2020-04-14 8:00 ` Markus Armbruster
@ 2020-04-14 8:47 ` Alex Bennée
2020-04-14 9:53 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 11+ messages in thread
From: Alex Bennée @ 2020-04-14 8:47 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-devel
Markus Armbruster <armbru@redhat.com> writes:
> Eric Blake <eblake@redhat.com> writes:
>
>> On 4/13/20 4:32 PM, Alex Bennée wrote:
>>>
>>> Eric Blake <eblake@redhat.com> writes:
>>>
>>>> On 4/13/20 11:29 AM, Alex Bennée wrote:
>>>>> As out-of-tree builds become more common (or rather building in a
>>>>> subdir) we can add a lot of load to "git ls-files" as it hunts down
>>>>> sub-directories that are irrelevant to the source tree. This is
>>>>> especially annoying if you have a prompt that attempts to summarise
>>>>> the current git status on command completion.
>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>>> ---
>>>>> .gitignore | 2 ++
>>>>> 1 file changed, 2 insertions(+)
>>>>> diff --git a/.gitignore b/.gitignore
>>>>> index 0c5af83aa74..7757dc08a08 100644
>>>>> --- a/.gitignore
>>>>> +++ b/.gitignore
>>>>> @@ -141,6 +141,8 @@ cscope.*
>>>>> tags
>>>>> TAGS
>>>>> docker-src.*
>>>>> +build
>>>>> +builds
>>>>
>>>> Would 'build-*' be worth adding as well?
>>>
>>> Sure - I'll add it to v2.
>>
>> Or even consolidate it into a single pattern: build* (which would
>> allow 'build', 'builds', 'build1', 'build23', 'build-fedora',
>> 'build-bug1234', ...)
>
> The looser the pattern, the higher the risk of unwanted matches.
>
> Would be less of an issue if we had a cleaner source root directory.
True but as of now we don't have anything matching bu* so I think build*
is fairly safe. I have ran into problems with over lax .gitignore
stanzas before but I don't think it's taken too long to figure out what
was going on. It's not like having a build subdir isn't a common
"out-of-tree" build idiom.
--
Alex Bennée
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] .gitignore: include common build sub-directories
2020-04-14 8:47 ` Alex Bennée
@ 2020-04-14 9:53 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-04-14 9:53 UTC (permalink / raw)
To: Alex Bennée, Markus Armbruster; +Cc: qemu-devel
On 4/14/20 10:47 AM, Alex Bennée wrote:
>
> Markus Armbruster <armbru@redhat.com> writes:
>
>> Eric Blake <eblake@redhat.com> writes:
>>
>>> On 4/13/20 4:32 PM, Alex Bennée wrote:
>>>>
>>>> Eric Blake <eblake@redhat.com> writes:
>>>>
>>>>> On 4/13/20 11:29 AM, Alex Bennée wrote:
>>>>>> As out-of-tree builds become more common (or rather building in a
>>>>>> subdir) we can add a lot of load to "git ls-files" as it hunts down
>>>>>> sub-directories that are irrelevant to the source tree. This is
>>>>>> especially annoying if you have a prompt that attempts to summarise
>>>>>> the current git status on command completion.
>>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>>>> ---
>>>>>> .gitignore | 2 ++
>>>>>> 1 file changed, 2 insertions(+)
>>>>>> diff --git a/.gitignore b/.gitignore
>>>>>> index 0c5af83aa74..7757dc08a08 100644
>>>>>> --- a/.gitignore
>>>>>> +++ b/.gitignore
>>>>>> @@ -141,6 +141,8 @@ cscope.*
>>>>>> tags
>>>>>> TAGS
>>>>>> docker-src.*
>>>>>> +build
>>>>>> +builds
>>>>>
>>>>> Would 'build-*' be worth adding as well?
>>>>
>>>> Sure - I'll add it to v2.
>>>
>>> Or even consolidate it into a single pattern: build* (which would
>>> allow 'build', 'builds', 'build1', 'build23', 'build-fedora',
>>> 'build-bug1234', ...)
>>
>> The looser the pattern, the higher the risk of unwanted matches.
>>
>> Would be less of an issue if we had a cleaner source root directory.
>
> True but as of now we don't have anything matching bu* so I think build*
> is fairly safe. I have ran into problems with over lax .gitignore
> stanzas before but I don't think it's taken too long to figure out what
> was going on. It's not like having a build subdir isn't a common
> "out-of-tree" build idiom.
We can restrict to directories using "build*/":
GITIGNORE(5)
· If the pattern ends with a slash, it is removed for the
purpose of the following description, but it would only
find a match with a directory. In other words, foo/ will
match a directory foo and paths underneath it, but will
not match a regular file or a symbolic link foo (this is
consistent with the way how pathspec works in general in
Git).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] .gitignore: include common build sub-directories
2020-04-13 16:29 [PATCH] .gitignore: include common build sub-directories Alex Bennée
2020-04-13 18:26 ` Eric Blake
@ 2020-04-14 15:06 ` Richard Henderson
2020-04-14 16:31 ` Alex Bennée
1 sibling, 1 reply; 11+ messages in thread
From: Richard Henderson @ 2020-04-14 15:06 UTC (permalink / raw)
To: Alex Bennée, qemu-devel
On 4/13/20 9:29 AM, Alex Bennée wrote:
> As out-of-tree builds become more common (or rather building in a
> subdir) we can add a lot of load to "git ls-files" as it hunts down
> sub-directories that are irrelevant to the source tree. This is
> especially annoying if you have a prompt that attempts to summarise
> the current git status on command completion.
Not a fan. Why do we encourage putting the build directory in tree anyway?
IMO any out-of-tree build really should be OUT of tree.
My build directories are always siblings of the source directory in the parent
directory.
r~
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] .gitignore: include common build sub-directories
2020-04-14 15:06 ` Richard Henderson
@ 2020-04-14 16:31 ` Alex Bennée
2020-04-14 16:39 ` Richard Henderson
0 siblings, 1 reply; 11+ messages in thread
From: Alex Bennée @ 2020-04-14 16:31 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel
Richard Henderson <richard.henderson@linaro.org> writes:
> On 4/13/20 9:29 AM, Alex Bennée wrote:
>> As out-of-tree builds become more common (or rather building in a
>> subdir) we can add a lot of load to "git ls-files" as it hunts down
>> sub-directories that are irrelevant to the source tree. This is
>> especially annoying if you have a prompt that attempts to summarise
>> the current git status on command completion.
>
> Not a fan. Why do we encourage putting the build directory in tree anyway?
> IMO any out-of-tree build really should be OUT of tree.
>
> My build directories are always siblings of the source directory in the parent
> directory.
It's not exactly an un-common pattern - especially if you have a lot of
build variants. Keeping them under builds makes it easier to blow the
whole lot away rather than having a messy parent directory which you
have to clean manually.
Personally it also works better with my tooling which can slurp up all
the build directories and present me with a menu of make commands to
build from. That's not a good argument for accepting the patch though.
>
>
> r~
--
Alex Bennée
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] .gitignore: include common build sub-directories
2020-04-14 16:31 ` Alex Bennée
@ 2020-04-14 16:39 ` Richard Henderson
0 siblings, 0 replies; 11+ messages in thread
From: Richard Henderson @ 2020-04-14 16:39 UTC (permalink / raw)
To: Alex Bennée; +Cc: qemu-devel
On 4/14/20 9:31 AM, Alex Bennée wrote:
> Richard Henderson <richard.henderson@linaro.org> writes:
>> My build directories are always siblings of the source directory in the parent
>> directory.
>
>
> It's not exactly an un-common pattern - especially if you have a lot of
> build variants. Keeping them under builds makes it easier to blow the
> whole lot away rather than having a messy parent directory which you
> have to clean manually.
"Manual" is a bit of an overstatement. In the end there's no difference at
all: it's rm -rf build* no matter the $PWD where you perform it.
As for "messy", you're the one that put stuff that doesn't belong into the
source directory. Mine is nice and clean. ;-)
> Personally it also works better with my tooling which can slurp up all
> the build directories and present me with a menu of make commands to
> build from. That's not a good argument for accepting the patch though.
Hah.
r~
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-04-14 16:55 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 16:29 [PATCH] .gitignore: include common build sub-directories Alex Bennée
2020-04-13 18:26 ` Eric Blake
2020-04-13 21:32 ` Alex Bennée
2020-04-13 21:42 ` Eric Blake
2020-04-13 21:45 ` Philippe Mathieu-Daudé
2020-04-14 8:00 ` Markus Armbruster
2020-04-14 8:47 ` Alex Bennée
2020-04-14 9:53 ` Philippe Mathieu-Daudé
2020-04-14 15:06 ` Richard Henderson
2020-04-14 16:31 ` Alex Bennée
2020-04-14 16:39 ` Richard Henderson
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.