<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pathspec.c, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-02-24T22:36:52Z</updated>
<entry>
<title>pathspec: convert some match_pathspec_depth() to ce_path_match()</title>
<updated>2014-02-24T22:36:52Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-01-24T13:40:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=429bb40abdb5b42ffdde5b1a58f9a37da723d179'/>
<id>urn:sha1:429bb40abdb5b42ffdde5b1a58f9a37da723d179</id>
<content type='text'>
This helps reduce the number of match_pathspec_depth() call sites and
show how match_pathspec_depth() is used.

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>Merge branch 'nd/negative-pathspec'</title>
<updated>2014-01-10T18:31:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-01-10T18:31:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=010d81ae35238c1b60144dce3fd3eba90a45b434'/>
<id>urn:sha1:010d81ae35238c1b60144dce3fd3eba90a45b434</id>
<content type='text'>
Introduce "negative pathspec" magic, to allow "git log -- . ':!dir'" to
tell us "I am interested in everything but 'dir' directory".

* nd/negative-pathspec:
  pathspec.c: support adding prefix magic to a pathspec with mnemonic magic
  Support pathspec magic :(exclude) and its short form :!
  glossary-content.txt: rephrase magic signature part
</content>
</entry>
<entry>
<title>Merge branch 'cc/starts-n-ends-with'</title>
<updated>2013-12-17T20:02:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-12-17T19:47:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad7044857660af7ffaaf8fbbccc77b817d1b938f'/>
<id>urn:sha1:ad7044857660af7ffaaf8fbbccc77b817d1b938f</id>
<content type='text'>
Remove a few duplicate implementations of prefix/suffix comparison
functions, and rename them to starts_with and ends_with.

* cc/starts-n-ends-with:
  replace {pre,suf}fixcmp() with {starts,ends}_with()
  strbuf: introduce starts_with() and ends_with()
  builtin/remote: remove postfixcmp() and use suffixcmp() instead
  environment: normalize use of prefixcmp() by removing " != 0"
</content>
</entry>
<entry>
<title>pathspec.c: support adding prefix magic to a pathspec with mnemonic magic</title>
<updated>2013-12-06T21:00:40Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-12-06T07:30:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1649612a227eaa5af7cb0e2d059728c0148485d9'/>
<id>urn:sha1:1649612a227eaa5af7cb0e2d059728c0148485d9</id>
<content type='text'>
Back in 233c3e6 (parse_pathspec: preserve prefix length via
PATHSPEC_PREFIX_ORIGIN - 2013-07-14), parse_pathspec() is taught to
save prefix length as a dynamic magic. This is needed when the
pathspec is passed to another process and and prefix lenght would be
lost.

Back then we support two cases. If the pathspec is normal, e.g. "abc",
we simply add the prefix to become ":(prefix:2)abc". If the pathspec
contains long magic, e.g. ":(foo,bar)abc" then we turn it to
":(foo,bar,prefix:2)abc". We do not support prefixing on short form,
because the only supported mnemonic '/' disappears after the the
preprocessing steps.

With the introduction of exclude magic with mnemonic '!', we need to
add support for the short form case so that ':!abc' becomes
':(exclude,prefix:2)abc'. Without this, it will break

    cd Documentation
    git add -p -- . ':!technical'

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>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>replace {pre,suf}fixcmp() with {starts,ends}_with()</title>
<updated>2013-12-05T22:13:21Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2013-11-30T20:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=59556548230e617b837343c2c07e357e688e2ca4'/>
<id>urn:sha1:59556548230e617b837343c2c07e357e688e2ca4</id>
<content type='text'>
Leaving only the function definitions and declarations so that any
new topic in flight can still make use of the old functions, replace
existing uses of the prefixcmp() and suffixcmp() with new API
functions.

The change can be recreated by mechanically applying this:

    $ git grep -l -e prefixcmp -e suffixcmp -- \*.c |
      grep -v strbuf\\.c |
      xargs perl -pi -e '
        s|!prefixcmp\(|starts_with\(|g;
        s|prefixcmp\(|!starts_with\(|g;
        s|!suffixcmp\(|ends_with\(|g;
        s|suffixcmp\(|!ends_with\(|g;
      '

on the result of preparatory changes in this series.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mi/typofixes'</title>
<updated>2013-12-03T19:41:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-12-03T19:41:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=144d84644fd3a2d0dc7be60766411970e82faf55'/>
<id>urn:sha1:144d84644fd3a2d0dc7be60766411970e82faf55</id>
<content type='text'>
* mi/typofixes:
  contrib: typofixes
  Documentation/technical/http-protocol.txt: typofixes
  typofixes: fix misspelt comments
</content>
</entry>
<entry>
<title>typofixes: fix misspelt comments</title>
<updated>2013-11-12T17:24:27Z</updated>
<author>
<name>Masanari Iida</name>
<email>standby24x7@gmail.com</email>
</author>
<published>2013-11-12T15:17:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=382d20e3ebc69ad20f54e71fc5f6ca17baa23973'/>
<id>urn:sha1:382d20e3ebc69ad20f54e71fc5f6ca17baa23973</id>
<content type='text'>
Signed-off-by: Masanari Iida &lt;standby24x7@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>
</feed>
