1
0
mirror of https://github.com/git/git.git synced 2025-04-02 07:10:08 +00:00
git/builtin
Nguyễn Thái Ngọc Duy ae8d082421 pathspec: pass directory indicator to match_pathspec_item()
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 <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24 14:37:19 -08:00
..
2013-12-17 12:02:44 -08:00
2014-01-10 10:33:11 -08:00
2014-01-17 12:21:20 -08:00
2014-01-17 12:21:20 -08:00
2014-01-17 12:21:20 -08:00
2013-12-30 12:27:01 -08:00
2014-01-17 12:21:20 -08:00
2014-01-27 10:44:59 -08:00
2014-01-17 12:21:20 -08:00
2013-12-27 14:57:50 -08:00
2014-01-17 12:21:20 -08:00
2013-12-17 12:02:44 -08:00
2013-12-17 14:12:17 -08:00
2013-07-15 10:56:07 -07:00
2014-01-17 12:21:20 -08:00