Re: [PATCH/WIP 01/11] Introduce "check-attr --excluded" as a replacement for "add --ignore-missing"

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH/WIP 01/11] Introduce "check-attr --excluded" as a replacement for "add --ignore-missing"

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:20

Nguyễn Thái Ngọc Duy  [off-list ref] writes:
--ignore-missing is used by submodule to check if a path may be
ignored by .gitignore files. It does not really fit in git-add (git
add takes pathspec, but --ignore-missing takes only paths)

Google reckons that --ignore-missing is not used anywhere but
git-submodule.sh. Remove --ignore-missing and introduce "check-attr
--excluded" as a replacement.
Hmm. "add --ignore-missing" somehow does not fit very well with other uses
of the option of the same name. In all other contexts, "ignore-missing"
means just that: ignore the fact that whatever _thing_ we were made to
expect to exist by the instruction from the user does not exist, which
usually results in an error or a report. "add --ignore-missing" does not
seem to be that (for one thing, it requires --dry-run).

It is unclear to me what is supposed to do to after reading the three-line
documentation in the manpage X-<.

So I am perfectly OK with the removal in the current form.

But I do not think "is this path ignored with the .gitignore rules" check
belongs to check-attr, either.

The pattern of having .scmignore files to list ignored paths were forced
upon us by historical version control systems, in the name of "the users
expect it". If there weren't such constraints, it would have been far
nicer---we could have just said "if you want to ignore paths, just use the
attributes mechanism and give them the 'ignored' attribute" without having
to have the exclude mechanism.

But we do not live in that ideal world.

Perhaps ls-files is a more suitable home for the feature?

Re: [PATCH/WIP 01/11] Introduce "check-attr --excluded" as a replacement for "add --ignore-missing"

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:52:20

2011/10/28 Junio C Hamano [off-list ref]:
Perhaps ls-files is a more suitable home for the feature?
ls-files sounds good. It does all kinds of file selection already.
I'll see if I can add -I (aka "show ignored files only) to it.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help