<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pathspec.h, branch v2.6.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.6.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.6.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2013-12-06T21:00:39Z</updated>
<entry>
<title>Support pathspec magic :(exclude) and its short form :!</title>
<updated>2013-12-06T21:00:39Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-12-06T07:30:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ef79b1f8704668a6cdf4278f9255e03ca785bfb4'/>
<id>urn:sha1:ef79b1f8704668a6cdf4278f9255e03ca785bfb4</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pathspec: stop --*-pathspecs impact on internal parse_pathspec() uses</title>
<updated>2013-10-28T16:57:36Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-10-26T02:09:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4a2d5ae262a6d372d0951da9cee3c7ad2a8dbca6'/>
<id>urn:sha1:4a2d5ae262a6d372d0951da9cee3c7ad2a8dbca6</id>
<content type='text'>
Normally parse_pathspec() is used on command line arguments where it
can do fancy thing like parsing magic on each argument or adding magic
for all pathspecs based on --*-pathspecs options.

There's another use of parse_pathspec(), where pathspec is needed, but
the input is known to be pure paths. In this case we usually don't
want --*-pathspecs to interfere. And we definitely do not want to
parse magic in these paths, regardless of --literal-pathspecs.

Add new flag PATHSPEC_LITERAL_PATH for this purpose. When it's set,
--*-pathspecs are ignored, no magic is parsed. And if the caller
allows PATHSPEC_LITERAL (i.e. the next calls can take literal magic),
then PATHSPEC_LITERAL will be set.

This fixes cases where git chokes when GIT_*_PATHSPECS are set because
parse_pathspec() indicates it won't take any magic. But
GIT_*_PATHSPECS add them anyway. These are

   export GIT_LITERAL_PATHSPECS=1
   git blame -- something
   git log --follow something
   git log --merge

"git ls-files --with-tree=path" (aka parse_pathspec() in
overlay_tree_on_cache()) is safe because the input is empty, and
producing one pathspec due to PATHSPEC_PREFER_CWD does not take any
magic into account.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/magic-pathspec'</title>
<updated>2013-09-09T21:50:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-09-09T21:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fadf96abaa5f42c4bb7b4b5017926779c23d8ef3'/>
<id>urn:sha1:fadf96abaa5f42c4bb7b4b5017926779c23d8ef3</id>
<content type='text'>
Use "struct pathspec" interface in more places, instead of array of
characters, the latter of which cannot express magic pathspecs
(e.g. ":(icase)makefile" that matches both Makefile and makefile).

* nd/magic-pathspec:
  add: lift the pathspec magic restriction on "add -p"
  pathspec: catch prepending :(prefix) on pathspec with short magic
</content>
</entry>
<entry>
<title>parse_pathspec: accept :(icase)path syntax</title>
<updated>2013-07-15T19:14:38Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-07-14T08:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=93d935371654faf2956a4c37c1ca46f3195ee832'/>
<id>urn:sha1:93d935371654faf2956a4c37c1ca46f3195ee832</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pathspec: support :(glob) syntax</title>
<updated>2013-07-15T17:56:10Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-07-14T08:36:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bd30c2e48432c692f9e77d3529c9cf25117066bb'/>
<id>urn:sha1:bd30c2e48432c692f9e77d3529c9cf25117066bb</id>
<content type='text'>
:(glob)path differs from plain pathspec that it uses wildmatch with
WM_PATHNAME while the other uses fnmatch without FNM_PATHNAME. The
difference lies in how '*' (and '**') is processed.

With the introduction of :(glob) and :(literal) and their global
options --[no]glob-pathspecs, the user can:

 - make everything literal by default via --noglob-pathspecs
   --literal-pathspecs cannot be used for this purpose as it
   disables _all_ pathspec magic.

 - individually turn on globbing with :(glob)

 - make everything globbing by default via --glob-pathspecs

 - individually turn off globbing with :(literal)

The implication behind this is, there is no way to gain the default
matching behavior (i.e. fnmatch without FNM_PATHNAME). You either get
new globbing or literal. The old fnmatch behavior is considered
deprecated and discouraged to use.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pathspec: support :(literal) syntax for noglob pathspec</title>
<updated>2013-07-15T17:56:09Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-07-14T08:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5c6933d201fab183a9779dca0fe43bf2f1eca098'/>
<id>urn:sha1:5c6933d201fab183a9779dca0fe43bf2f1eca098</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>kill limit_pathspec_to_literal() as it's only used by parse_pathspec()</title>
<updated>2013-07-15T17:56:09Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-07-14T08:36:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=341003e715c9a7c0332d3f8f08c2f3696a057565'/>
<id>urn:sha1:341003e715c9a7c0332d3f8f08c2f3696a057565</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse_pathspec: make sure the prefix part is wildcard-free</title>
<updated>2013-07-15T17:56:09Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-07-14T08:36:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=645a29c40a12a4ade1b041dce246ae241c502a64'/>
<id>urn:sha1:645a29c40a12a4ade1b041dce246ae241c502a64</id>
<content type='text'>
Prepending prefix to pathspec is a trick to workaround the fact that
commands can be executed in a subdirectory, but all git commands run
at worktree's root. The prefix part should always be treated as
literal string. Make it so.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rename field "raw" to "_raw" in struct pathspec</title>
<updated>2013-07-15T17:56:09Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-07-14T08:36:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b3920bbdc51fc360bde70e7c19088acfe44b9c4b'/>
<id>urn:sha1:b3920bbdc51fc360bde70e7c19088acfe44b9c4b</id>
<content type='text'>
This patch is essentially no-op. It helps catching new use of this
field though. This field is introduced as an intermediate step for the
pathspec conversion and will be removed eventually. At this stage no
more access sites should be introduced.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remove match_pathspec() in favor of match_pathspec_depth()</title>
<updated>2013-07-15T17:56:09Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-07-14T08:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=84b8b5d1fa244bc591291a3cf18bf0fa9976ad17'/>
<id>urn:sha1:84b8b5d1fa244bc591291a3cf18bf0fa9976ad17</id>
<content type='text'>
match_pathspec_depth was created to replace match_pathspec (see
61cf282 (pathspec: add match_pathspec_depth() - 2010-12-15). It took
more than two years, but the replacement finally happens :-)

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
