From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>,
"Markus Armbruster" <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] .gitignore: include common build sub-directories
Date: Tue, 14 Apr 2020 11:53:48 +0200 [thread overview]
Message-ID: <b96c529e-1d17-ff48-da10-eae13a939cbe@redhat.com> (raw)
In-Reply-To: <873696qwrc.fsf@linaro.org>
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).
next prev parent reply other threads:[~2020-04-14 9:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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é [this message]
2020-04-14 15:06 ` Richard Henderson
2020-04-14 16:31 ` Alex Bennée
2020-04-14 16:39 ` Richard Henderson
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=b96c529e-1d17-ff48-da10-eae13a939cbe@redhat.com \
--to=philmd@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).