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:42:03 -0800	[thread overview]
Message-ID: <xmqqmw4hmtlw.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAG4vEKM-2sy0z3=YLS+rgH99w6ukdcNBode9CAh4C4t9eSa02A@mail.gmail.com> (Daniel Finnie's message of "Fri, 13 Feb 2015 14:23:40 -0500")

Daniel Finnie <dan@danfinnie•com> writes:

> My question deals with the --exclude-from option to git-ls-files.

You will be fine if you remember that these plumbing commands work
by first cd'ing to the top-level of the working tree (and adjust the
paths given from the command line by prefixing the prefix to them).

The input lines that come from --exclude-per-directory should go
through the prefixing, but -X=<file> makes that single file affect
the whole operation.  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.

  reply	other threads:[~2015-02-13 20:42 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 [this message]
2015-02-13 20:54   ` Junio C Hamano
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=xmqqmw4hmtlw.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