<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pathspec.c, branch v2.16.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.16.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.16.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-11-06T04:11:29Z</updated>
<entry>
<title>Merge branch 'ex/deprecate-empty-pathspec-as-match-all'</title>
<updated>2017-11-06T04:11:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-11-06T04:11:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=728c57380338eed1aaad6047046ca71826e8066c'/>
<id>urn:sha1:728c57380338eed1aaad6047046ca71826e8066c</id>
<content type='text'>
The final step to make an empty string as a pathspec element
illegal.  We started this by first deprecating and warning a
pathspec that has such an element in 2.11 (Nov 2016).

Hopefully we can merge this down to the 'master' by the end of the
year?  A deprecation warning period that is about 1 year does not
sound too bad.

* ex/deprecate-empty-pathspec-as-match-all:
  pathspec: die on empty strings as pathspec
  t0027: do not use an empty string as a pathspec element
</content>
</entry>
<entry>
<title>pathspec doc: parse_pathspec does not maintain references to args</title>
<updated>2017-09-21T05:05:00Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2017-09-21T04:41:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=29c0e902a803d8865b9421edadf2ca7c565e355c'/>
<id>urn:sha1:29c0e902a803d8865b9421edadf2ca7c565e355c</id>
<content type='text'>
The command line arguments passed to main() are valid for the life of
a program, but the same is not true for all other argv-style arrays
(e.g.  when a caller creates an argv_array).  Clarify that
parse_pathspec does not rely on the argv passed to it to remain valid.

This makes it easier to tell that callers like "git rev-list --stdin"
are safe and ensures that that is more likely to remain true as the
implementation of parse_pathspec evolves.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Spelling fixes</title>
<updated>2017-06-27T17:35:49Z</updated>
<author>
<name>Ville Skyttä</name>
<email>ville.skytta@iki.fi</email>
</author>
<published>2017-06-25T10:20:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=64127575149e35b409bc2f78962f86507346d604'/>
<id>urn:sha1:64127575149e35b409bc2f78962f86507346d604</id>
<content type='text'>
Signed-off-by: Ville Skyttä &lt;ville.skytta@iki.fi&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/free-and-null'</title>
<updated>2017-06-24T21:28:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-24T21:28:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=50f03c6676ed5ea040dd53272882d3aac2ee1b48'/>
<id>urn:sha1:50f03c6676ed5ea040dd53272882d3aac2ee1b48</id>
<content type='text'>
A common pattern to free a piece of memory and assign NULL to the
pointer that used to point at it has been replaced with a new
FREE_AND_NULL() macro.

* ab/free-and-null:
  *.[ch] refactoring: make use of the FREE_AND_NULL() macro
  coccinelle: make use of the "expression" FREE_AND_NULL() rule
  coccinelle: add a rule to make "expression" code use FREE_AND_NULL()
  coccinelle: make use of the "type" FREE_AND_NULL() rule
  coccinelle: add a rule to make "type" code use FREE_AND_NULL()
  git-compat-util: add a FREE_AND_NULL() wrapper around free(ptr); ptr = NULL
</content>
</entry>
<entry>
<title>Merge branch 'bw/config-h'</title>
<updated>2017-06-24T21:28:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-24T21:28:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f31d23a399d557d687266b4375a0436f920cc051'/>
<id>urn:sha1:f31d23a399d557d687266b4375a0436f920cc051</id>
<content type='text'>
Fix configuration codepath to pay proper attention to commondir
that is used in multi-worktree situation, and isolate config API
into its own header file.

* bw/config-h:
  config: don't implicitly use gitdir or commondir
  config: respect commondir
  setup: teach discover_git_directory to respect the commondir
  config: don't include config.h by default
  config: remove git_config_iter
  config: create config.h
</content>
</entry>
<entry>
<title>pathspec: die on empty strings as pathspec</title>
<updated>2017-06-23T20:10:35Z</updated>
<author>
<name>Emily Xie</name>
<email>emilyxxie@gmail.com</email>
</author>
<published>2017-06-07T03:33:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9e4e8a64c2b9043b7ae2b6476efd9214c6738505'/>
<id>urn:sha1:9e4e8a64c2b9043b7ae2b6476efd9214c6738505</id>
<content type='text'>
An empty string as a pathspec element matches all paths.  A buggy
script, however, could accidentally assign an empty string to a
variable that then gets passed to a Git command invocation, e.g.:

  path=... compute a path to be removed in $path ...
        git rm -r "$path"

which would unintentionally remove all paths in the current
directory.

The fix for this issue comprises of two steps. Step 1, which warns
that empty strings as pathspecs will become invalid, has already
been implemented in commit d426430 ("pathspec: warn on empty strings
as pathspec", 2016-06-22).

This patch is step 2. It removes the warning and throws an error
instead.

Signed-off-by: Emily Xie &lt;emilyxxie@gmail.com&gt;
Reported-by: David Turner &lt;novalis@novalis.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>coccinelle: make use of the "type" FREE_AND_NULL() rule</title>
<updated>2017-06-16T19:44:03Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2017-06-15T23:15:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6a83d902073803c4141e02c53decf8c03e35da27'/>
<id>urn:sha1:6a83d902073803c4141e02c53decf8c03e35da27</id>
<content type='text'>
Apply the result of the just-added coccinelle rule. This manually
excludes a few occurrences, mostly things that resulted in many
FREE_AND_NULL() on one line, that'll be manually fixed in a subsequent
change.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: don't include config.h by default</title>
<updated>2017-06-15T19:56:22Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-06-14T18:07:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2141fc1d20e659810245ec6ca1c143c60e033ec'/>
<id>urn:sha1:b2141fc1d20e659810245ec6ca1c143c60e033ec</id>
<content type='text'>
Stop including config.h by default in cache.h.  Instead only include
config.h in those files which require use of the config system.

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: convert find_pathspecs_matching_against_index to take an index</title>
<updated>2017-05-12T05:23:46Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-05-11T22:04:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=08de9151a8a67f29a3a5a36931298237d78ca736'/>
<id>urn:sha1:08de9151a8a67f29a3a5a36931298237d78ca736</id>
<content type='text'>
Convert find_pathspecs_matching_against_index to take an index
parameter.

In addition mark pathspec.c with NO_THE_INDEX_COMPATIBILITY_MACROS now
that it doesn't use any cache macros or reference 'the_index'.

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: remove PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP</title>
<updated>2017-05-12T05:23:46Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-05-11T22:04:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2249d4dbc197d45da5407cbc80b2461e49bb8785'/>
<id>urn:sha1:2249d4dbc197d45da5407cbc80b2461e49bb8785</id>
<content type='text'>
Since (ae8d08242 pathspec: pass directory indicator to
match_pathspec_item()) the path matching logic has been able to cope
with submodules without needing to strip off a trailing slash if a path
refers to a submodule.

Since stripping the slash is no longer necessary, remove the
PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP flag.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
