<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t4010-diff-pathspec.sh, branch v2.4.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-03-05T20:45:43Z</updated>
<entry>
<title>Merge branch 'jc/diff-test-updates'</title>
<updated>2015-03-05T20:45:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-05T20:45:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fa8baa4b2acf6f8be8f28bf84493e0889e45eb91'/>
<id>urn:sha1:fa8baa4b2acf6f8be8f28bf84493e0889e45eb91</id>
<content type='text'>
Test clean-up.

* jc/diff-test-updates:
  test_ln_s_add: refresh stat info of fake symbolic links
  t4008: modernise style
  t/diff-lib: check exact object names in compare_diff_raw
  tests: do not borrow from COPYING and README from the real source
  t4010: correct expected object names
  t9300: correct expected object names
  t4008: correct stale comments
</content>
</entry>
<entry>
<title>t4010: correct expected object names</title>
<updated>2015-02-15T23:38:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-02-15T21:35:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bb8db1b5538a455a0892312b25d73d51f2650429'/>
<id>urn:sha1:bb8db1b5538a455a0892312b25d73d51f2650429</id>
<content type='text'>
The output the test expects is bogus.

It was left unnoticed only because compare_diff_raw, which only
cares about the add/delete/rename/copy was used to check the result.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t4010-diff-pathspec.sh: use the $( ... ) construct for command substitution</title>
<updated>2014-04-30T18:08:05Z</updated>
<author>
<name>Elia Pinto</name>
<email>gitter.spiros@gmail.com</email>
</author>
<published>2014-04-30T16:22:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=38b2e5d12cbe681bff8f31cf10e3de8bd6f6db52'/>
<id>urn:sha1:38b2e5d12cbe681bff8f31cf10e3de8bd6f6db52</id>
<content type='text'>
The Git CodingGuidelines prefer the $(...) construct for command
substitution instead of using the backquotes `...`.

The backquoted form is the traditional method for command
substitution, and is supported by POSIX.  However, all but the
simplest uses become complicated quickly.  In particular, embedded
command substitutions and/or the use of double quotes require
careful escaping with the backslash character.

The patch was generated by:

for _f in $(find . -name "*.sh")
do
   sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
done

and then carefully proof-read.

Signed-off-by: Elia Pinto &lt;gitter.spiros@gmail.com&gt;
Reviewed-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/submodule-pathspec-ending-with-slash'</title>
<updated>2014-02-27T22:01:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-02-27T22:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cbaeafc3251d08b479c5eb735444bb6ad6210c93'/>
<id>urn:sha1:cbaeafc3251d08b479c5eb735444bb6ad6210c93</id>
<content type='text'>
Allow "git cmd path/", when the 'path' is where a submodule is
bound to the top-level working tree, to match 'path', despite the
extra and unnecessary trailing slash.

* nd/submodule-pathspec-ending-with-slash:
  clean: use cache_name_is_other()
  clean: replace match_pathspec() with dir_path_match()
  pathspec: pass directory indicator to match_pathspec_item()
  match_pathspec: match pathspec "foo/" against directory "foo"
  dir.c: prepare match_pathspec_item for taking more flags
  pathspec: rename match_pathspec_depth() to match_pathspec()
  pathspec: convert some match_pathspec_depth() to dir_path_match()
  pathspec: convert some match_pathspec_depth() to ce_path_match()
</content>
</entry>
<entry>
<title>pathspec: pass directory indicator to match_pathspec_item()</title>
<updated>2014-02-24T22:37:19Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-01-24T13:40:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ae8d0824217bdf97c69ead49568cd03fc140627b'/>
<id>urn:sha1:ae8d0824217bdf97c69ead49568cd03fc140627b</id>
<content type='text'>
This patch activates the DO_MATCH_DIRECTORY code in m_p_i(), which
makes "git diff HEAD submodule/" and "git diff HEAD submodule" produce
the same output. Previously only the version without trailing slash
returns the difference (if any).

That's the effect of new ce_path_match(). dir_path_match() is not
executed by the new tests. And it should not introduce regressions.

Previously if path "dir/" is passed in with pathspec "dir/", they
obviously match. With new dir_path_match(), the path becomes
_directory_ "dir" vs pathspec "dir/", which is not executed by the old
code path in m_p_i(). The new code path is executed and produces the
same result.

The other case is pathspec "dir" and path "dir/" is now turned to
"dir" (with DO_MATCH_DIRECTORY). Still the same result before or after
the patch.

So why change? Because of the next patch about clean.c.

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 'as/tree-walk-fix-aggressive-short-cut'</title>
<updated>2014-01-27T18:48:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-01-27T18:48:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8bba7206b503b63a8208355f66bc09c981072d51'/>
<id>urn:sha1:8bba7206b503b63a8208355f66bc09c981072d51</id>
<content type='text'>
* as/tree-walk-fix-aggressive-short-cut:
  tree_entry_interesting: match against all pathspecs
</content>
</entry>
<entry>
<title>tree_entry_interesting: match against all pathspecs</title>
<updated>2014-01-27T17:01:50Z</updated>
<author>
<name>Andy Spencer</name>
<email>andy753421@gmail.com</email>
</author>
<published>2014-01-25T22:06:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e4ddb05720710213108cd13ddd5a115e12a6211d'/>
<id>urn:sha1:e4ddb05720710213108cd13ddd5a115e12a6211d</id>
<content type='text'>
The current basedir compare aborts early in order to avoid futile
recursive searches. However, a match may still be found by another
pathspec. This can cause an error while checking out files from a branch
when using multiple pathspecs:

$ git checkout master -- 'a/*.txt' 'b/*.txt'
error: pathspec 'a/*.txt' did not match any file(s) known to git.

Signed-off-by: Andy Spencer &lt;andy753421@gmail.com&gt;
Acked-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>tree-walk.c: ignore trailing slash on submodule in tree_entry_interesting()</title>
<updated>2014-01-23T21:03:00Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-01-23T13:22:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=74b4f7f27736f3e196a4eb3db41c68e37a6e2160'/>
<id>urn:sha1:74b4f7f27736f3e196a4eb3db41c68e37a6e2160</id>
<content type='text'>
We do ignore trailing slash on a directory, so pathspec "abc/" matches
directory "abc". A submodule is also a directory. Apply the same logic
to it. This makes "git log submodule-path" and "git log submodule-path/"
produce the same output.

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>diff-index: enable recursive pathspec matching in unpack_trees</title>
<updated>2012-01-16T22:17:18Z</updated>
<author>
<name>Nguyen Thai Ngoc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-01-15T10:03:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4838237cb73a13d38a7e4348b71be96b60eed21e'/>
<id>urn:sha1:4838237cb73a13d38a7e4348b71be96b60eed21e</id>
<content type='text'>
The pathspec structure has a few bits of data to drive various operation
modes after we unified the pathspec matching logic in various codepaths.
For example, max_depth field is there so that "git grep" can limit the
output for files found in limited depth of tree traversal. Also in order
to show just the surface level differences in "git diff-tree", recursive
field stops us from descending into deeper level of the tree structure
when it is set to false, and this also affects pathspec matching when
we have wildcards in the pathspec.

The diff-index has always wanted the recursive behaviour, and wanted to
match pathspecs without any depth limit. But we forgot to do so when we
updated tree_entry_interesting() logic to unify the pathspec matching
logic.

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>tree_entry_interesting(): optimize wildcard matching when base is matched</title>
<updated>2011-02-03T22:08:30Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2010-12-15T15:02:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f1a2ddbbc2df4e81e005a7e82f9e23fb6a9f95e3'/>
<id>urn:sha1:f1a2ddbbc2df4e81e005a7e82f9e23fb6a9f95e3</id>
<content type='text'>
If base is already matched, skip that part when calling
fnmatch(). This happens quite often if users start a command from
worktree's subdirectory and prefix is usually prepended to all
pathspecs.

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>
