]> git.ipfire.org Git - thirdparty/git.git/commit - git-p4.py
git-p4: don't exclude other files with same prefix
authorMazo, Andrey <amazo@checkvideo.com>
Mon, 1 Apr 2019 18:02:32 +0000 (18:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Apr 2019 02:25:41 +0000 (11:25 +0900)
commita2bee10ad9ed4dc45c1f7da76f01388925b80212
tree810beb7f27c96c7fe252f595dbc94db538d046a3
parentd6045201fcec7bd9738fea4daf9d176d8df9f5ba
git-p4: don't exclude other files with same prefix

Make sure not to exclude files unintentionally
if exclude paths are specified without a trailing /.
I.e., don't exclude "//depot/file_dont_exclude" if run with "-//depot/file".

Do this by ensuring that paths without a trailing "/" are only matched completely.

Also, abort path search on the first match as a micro-optimization.

Signed-off-by: Andrey Mazo <amazo@checkvideo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-p4.py
t/t9817-git-p4-exclude.sh