]> git.ipfire.org Git - thirdparty/git.git/commit - remote.c
relative_url(): fix incorrect condition
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 15 Jun 2022 23:35:44 +0000 (23:35 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Jun 2022 20:22:03 +0000 (13:22 -0700)
commitc918f5c1ab0c4dec916b747916236ca0d3655be5
tree656d6953fddafb3a2e23f7631996ed9e7ade9da4
parent41f1a8e6a417bc3e56a0eef687e28247138276d1
relative_url(): fix incorrect condition

In 63e95beb085c (submodule: port resolve_relative_url from shell to C,
2016-04-15), we added a loop over `url` where we are looking for `../`
or `./` components.

The loop condition we used is the pointer `url` itself, which is clearly
not what we wanted.

Pointed out by Coverity.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c