git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Dakota Hawkins <dakota@dakotahawkins.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Jeff King <peff@peff.net>, Duy Nguyen <pclouds@gmail.com>,
	Junio C Hamano <gitster@pobox.com>, Git <git@vger.kernel.org>
Subject: Re: [PATCH] doc: clarify non-recursion for ignore paths like `foo/`
Date: Wed, 21 Mar 2018 07:53:24 -0400	[thread overview]
Message-ID: <CAHnyXxQRfzAT75P7dxvdEEN_FRYCc7j97VEfL8tTUgVdeK-O+g@mail.gmail.com> (raw)
In-Reply-To: <87muz1brgt.fsf@evledraar.gmail.com>

First, apologies since I didn't get the in-reply-to correct in my
email header. I'm not sure how to do that (using gmail/gsuite).

Meant to reply to:
https://public-inbox.org/git/20180321075041.GA24701@sigill.intra.peff.net/

> Just before the context your patch quotes, we have this in gitignore(5)
> already:
>
>     [...]It is not possible to re-include a file if a parent directory
>     of that file is excluded. Git doesn’t list excluded directories for
>     performance reasons, so any patterns on contained files have no
>     effect, no matter where they are defined.[...]
>
> I can't see how your change to the documentation doesn't just re-state
> what we already have documented, which is not to say the docs can't be
> improved, but then we should clearly state this in one place, not
> re-state it within the span of a few paragraphs.

Context:

This came up originally because of confusion with .gitattributes
patterns, since gitattributes doesn't have the same `foo/` matching
behavior. Jeff King was kind enough to prepare a patch for that
documentation here:
https://public-inbox.org/git/20180320041454.GA15213@sigill.intra.peff.net/

Re-reading the section you quoted again a couple of times you're
correct, but somehow that wasn't clear to me despite reading/searching
for what I wanted to see several times.

While what I wrote may need improvement, I think there are a couple of
valid concerns with the way this behavior is documented currently:

  - Generally: Reading about pattern matching for .gitignore is
awkward on its face, since positive matches have negative consequences
(in other words `include = !match`).
  - Specifically: This behavior that is specific to `foo/` matches is
documented in the section for `!foo` matches. If you're trying to find
the implications of `foo/` you may not have read about `!foo` as
carefully.

Since this behavior is practically applicable to both pattern formats,
and since patterns in the sum of a repo's .gitignore files can get
somewhat complicated, I think it would be a good idea to either:

  - Do this and basically explain the same behavior twice in two
pattern format sections, or
  - Pull the documentation for this behavior out into another section
where users would be likely to find and understand it if they're
looking into either pattern format

Does that make sense?

What do you think?

Thanks for the feedback,

- Dakota

  reply	other threads:[~2018-03-21 11:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21 11:13 [PATCH] doc: clarify non-recursion for ignore paths like `foo/` Dakota Hawkins
2018-03-21 11:25 ` Ævar Arnfjörð Bjarmason
2018-03-21 11:53   ` Dakota Hawkins [this message]
2018-03-21 12:13     ` Dakota Hawkins
2018-03-21 12:21     ` Ævar Arnfjörð Bjarmason
2018-03-21 12:46       ` Dakota Hawkins

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHnyXxQRfzAT75P7dxvdEEN_FRYCc7j97VEfL8tTUgVdeK-O+g@mail.gmail.com \
    --to=dakota@dakotahawkins.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).