Re: [PATCH] add GIT_PATHSPEC_GLOB environment variable

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

 



Jeff King <peff@xxxxxxxx> writes:

> I included the common_prefix fix you mentioned (I do not think it
> produced incorrect results as it was, but it did not take full advantage
> of an optimization).

I do not think it would have affected the outcome; you would only
have worked with more cycles.

> Subject: add GIT_PATHSPEC_GLOB environment variable

Seems cleanly done from a quick look.

Given that the normal mode of operation is to use globbing, I
suspect that the names would have been more natural if the toggle
were GIT_PATHSPEC_LITERAL and the boolean function were
limit_pathspec_to_literal(), instead of "allow_pathspec_glob()",
sounding as if using glob is done only upon request.

But that is a minor issue.

> This patch introduces an environment variable to turn all
> pathspecs into literal strings. This makes it easy to turn
> off the globbing behavior for a whole environment (e.g., if
> you are serving repos via a web interface that is only going
> to use literal programmatic pathspecs), or for a particular
> run.

I am not sure if "web interface" is a particularly good example,
though.  Is it unusual to imagine a Web UI that takes pathspecs from
the user to limit its output (e.g. "diff" or "ls-tree") to those
paths that match them?  In such a case, the user would expect their
pathspecs to work the same way as the Git installed on their
desktop, I would think.

Will queue; thanks.
--
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]