From: Junio C Hamano <junkio@cox.net>
To: "Karl Hasselström" <kha@treskal.com>
Cc: git@vger.kernel.org
Subject: Re: Cogito and --exclude vs --exclude-per-directory
Date: Wed, 16 Nov 2005 11:01:50 -0800 [thread overview]
Message-ID: <7vd5l08li9.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20051116093630.GA2783@diana.vm.bytemark.co.uk> (Karl Hasselström's message of "Wed, 16 Nov 2005 10:36:30 +0100")
Karl Hasselström <kha@treskal.com> writes:
> [Note: this experiment was done with git 0.99.9g and Cogito 0.15.1, so ]
>
> It seems that --exclude patterns always take precedence over
> --exclude-per-directory patterns.
>
> Is this the intended behavior?
Yes, we had a lengthy discussion on this before ls-files
acquired the exclude patterns.
Documentation/git-ls-files.txt "Exclude Patterns" summarizes the
precedence rule, and it was done that way to allow command line
users to override what are in individual per-directory pattern
files per-invocation basis. That is, --exclude-per-directory is
to store project defaults, and --exclude is for end-users to
specify override per-invocation. --exclude-from has the lowest
precedence to give overall default. The example in the
documetation has a a good illustration.
* --exclude-from contains '*.[oa]' to catch generic
"uninteresting" files.
* --exclude-per-directory files contain patterns to
catch files that are built by the Makefile in the
directory.
* --exclude specifies whatever the user feels like for
the particular invocation.
If I were writing a Porcelain, I would probably install default
exclude list in /usr/lib/MyPorcelain/exclude file and point at
the file with --exclude-from. I may also be tempted to check
$HOME/.MyPorcelain/exclude file and add it to give defaults per
user, but I do not do Porcelains, so...
prev parent reply other threads:[~2005-11-16 19:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-16 9:36 Cogito and --exclude vs --exclude-per-directory Karl Hasselström
2005-11-16 9:38 ` Karl Hasselström
2005-11-16 19:01 ` Junio C Hamano [this message]
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=7vd5l08li9.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=kha@treskal.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