Re: git ls-files -X option is relative to repo root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> 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)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]