From: Klaatu <klaatu@member.fsf.org>
To: git@vger.kernel.org
Subject: Git excludes fails to avoid git submodule warning
Date: Sun, 24 Mar 2019 11:15:29 -0700 [thread overview]
Message-ID: <5352115.zUM9HkL6VV@beast> (raw)
Working with Git 2.21.0 on Linux:
The git-add(1) man page says:
"The optional configuration variable core.excludesFile indicates a path to a
file containing patterns of file names to exclude from git-add"
But if I do this:
$ echo "docs/themes/*/.git >> .gitexcludes
$ git config core.excludeFiles .gitexcludes
$ git add docs
warning: adding embedded git repository: docs/themes/foo
It seems to me that this goes against what the git-add(1) man page says.
A workaround I found on stackoverflow is to add any file within the target
directory:
$ git add docs/themes/foo/README
And then add everything:
$ git add docs
In which case the contents of .gitexcludes is honoured. But that seems like a
hack.
Am I experiencing the intended result of Git's exclude function? If so, I'll
happily submit a patch to the man page to clarify this behaviour. If not, I
guess I'm submitting a bug report here.
Thanks for all the amazing work.
Cheers.
next reply other threads:[~2019-03-23 23:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-24 18:15 Klaatu [this message]
2019-03-24 7:58 ` Git excludes fails to avoid git submodule warning Duy Nguyen
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=5352115.zUM9HkL6VV@beast \
--to=klaatu@member.fsf.org \
--cc=git@vger.kernel.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