From: Junio C Hamano <gitster@pobox•com>
To: John Szakmeister <john@szakmeister•net>
Cc: Philip Oakley <philipoakley@iee•org>, git@vger•kernel.org
Subject: Re: Expected behavior of "git check-ignore"...
Date: Mon, 24 Jul 2017 12:23:46 -0700 [thread overview]
Message-ID: <xmqq4lu1ej0d.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAEBDL5X3wr=4A+W_sQzSE9BazoxoS2bwcOBZV5Jw=WCWZHAi6A@mail.gmail.com> (John Szakmeister's message of "Mon, 24 Jul 2017 05:33:45 -0400")
John Szakmeister <john@szakmeister•net> writes:
> Correct, it appears that if any line in the ignore matches, then it
> exits with 0. So it's not that it's ignored, but that there is a
> matching line in an ignore file somewhere. I can see the logic in
> this if it's meant to be a debugging tools, especially combined with
> -v. Simply changing it does affect quite a few tests, but I'm not
> sure that it was intentional for negation to be treated this way.
I am reasonably sure that the command started its life as a pure
debugging aid.
The treatment of the negation _might_ impose conflicting goals to
its purpose as a debugging aid---a user who debugs his .gitignore
file would want to know what causes a thing that wants to be ignored
is not or vice versa, and use of the exit status to indicate if it
is ignored may not mesh well with its goal as a debugging aid, but I
didn't think about the potential issues deeply myself while writing
this response. As you mentioned, use of (or not using) "-v" could
be used as a sign to see which behaviour the end-user expects, I
guess.
next prev parent reply other threads:[~2017-07-24 19:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 10:37 Expected behavior of "git check-ignore" John Szakmeister
2017-07-23 16:33 ` Philip Oakley
2017-07-24 9:33 ` John Szakmeister
2017-07-24 19:23 ` Junio C Hamano [this message]
2017-07-27 11:20 ` John Szakmeister
2017-07-27 17:05 ` Junio C Hamano
2017-07-30 15:57 ` Philip Oakley
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=xmqq4lu1ej0d.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=john@szakmeister$(echo .)net \
--cc=philipoakley@iee$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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