<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pathspec.h, branch v2.10.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.10.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.10.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-09-29T23:49:34Z</updated>
<entry>
<title>Merge branch 'bw/pathspec-remove-unused-extern-decl' into maint</title>
<updated>2016-09-29T23:49:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-29T23:49:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9e2c4fa5d381225f3cdb8e6578ff2a0b8080fa0d'/>
<id>urn:sha1:9e2c4fa5d381225f3cdb8e6578ff2a0b8080fa0d</id>
<content type='text'>
Code cleanup.

* bw/pathspec-remove-unused-extern-decl:
  pathspec: remove unnecessary function prototypes
</content>
</entry>
<entry>
<title>pathspec: remove unnecessary function prototypes</title>
<updated>2016-09-13T23:10:03Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2016-09-13T16:52:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e78d57ec8e330ab59058f932c0ba211014f4f6be'/>
<id>urn:sha1:e78d57ec8e330ab59058f932c0ba211014f4f6be</id>
<content type='text'>
A few functions were removed in 5a76aff1 ("add: convert to use
parse_pathspec", 2013-07-14), but we forgot to remove their external
declarations from pathspec.h while doing so.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pathspec: rename free_pathspec() to clear_pathspec()</title>
<updated>2016-06-02T21:09:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-06-02T21:09:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ed6e8038f98e7f15e571a9a291ee4acf438b4dc5'/>
<id>urn:sha1:ed6e8038f98e7f15e571a9a291ee4acf438b4dc5</id>
<content type='text'>
The function takes a pointer to a pathspec structure, and releases
the resources held by it, but does not free() the structure itself.
Such a function should be called "clear", not "free".

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
