Browse Source
Submodules should be handled the same as regular directories with respect to the presence of a trailing slash, i.e. commands like: git diff rev1 rev2 -- $path git rev-list HEAD -- $path should produce the same output whether $path is 'submod' or 'submod/'. This has been fixed in commitmaint74b4f7f277
(tree-walk.c: ignore trailing slash on submodule in tree_entry_interesting(), 2014-01-23). Unfortunately, that commit had the unintended side effect to handle 'submod/anything' the same as 'submod' and 'submod/' as well, e.g.: $ git log --oneline --name-only -- sha1collisiondetection/whatever4125f78222
sha1dc: update from upstream sha1collisiondetection07a20f569b
Makefile: fix unaligned loads in sha1dc with UBSan sha1collisiondetection23e37f8e9d
sha1dc: update from upstream sha1collisiondetection86cfd61e6b
sha1dc: optionally use sha1collisiondetection as a submodule sha1collisiondetection Fix this by rejecting submodules as partial pathnames when their trailing slash is followed by anything. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor
5 years ago
committed by
Junio C Hamano
2 changed files with 11 additions and 2 deletions
Loading…
Reference in new issue