public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Daniel Finnie <dan@danfinnie•com>
Cc: git@vger•kernel.org
Subject: Re: git ls-files -X option is relative to repo root
Date: Fri, 13 Feb 2015 12:54:45 -0800	[thread overview]
Message-ID: <xmqqiof5mt0q.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <xmqqmw4hmtlw.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Fri, 13 Feb 2015 12:42:03 -0800")

Junio C Hamano <gitster@pobox•com> writes:

> ...  It does not make sense to allow where you are
> to affect behaviour of the command, i.e. in these two invocations of
> ls-files:
>
> 	git ls-files -X /var/tmp/exclude -i
>         cd example && git ls-files -X /var/tmp/exclude -i
>
> if the same line in /var/tmp/exclude meant completely different
> things, it would be crazy.

To put it another way, think of --exclude-from as a way to specify a
replacement for .git/info/excludes, and --exclude-per-directory as a
way to specify a replacement for the in-tree .gitignore files.

Historically, we did not have the --exclude-standard option from the
beginning, and only after we gained experience with --exclude-from
and --exclude-per-directory in our scripts, the --exclude-standard
was added to codify the (then-) best-current-practice after the fact,
and we used --exclude-from for exactly that purpose before then.

cf. 8e7b07c8 (git-ls-files: add --exclude-standard, 2007-11-15)

  reply	other threads:[~2015-02-13 20:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13 19:23 git ls-files -X option is relative to repo root Daniel Finnie
2015-02-13 20:42 ` Junio C Hamano
2015-02-13 20:54   ` Junio C Hamano [this message]
2015-02-13 21:19     ` Daniel Finnie
2015-02-13 22:02       ` Junio C Hamano

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=xmqqiof5mt0q.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=dan@danfinnie$(echo .)com \
    --cc=git@vger$(echo .)kernel.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