difftool: sanitize $workdir as early as possible
commite6e3e2a67c8dacb0ed726f09cf203568f24f8e74
authorDavid Aguilar <davvid@gmail.com>
Fri, 9 Dec 2016 08:58:46 +0000 (9 00:58 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Dec 2016 00:18:53 +0000 (11 16:18 -0800)
tree9cc84e961e75bdc711ecb888dc7aa989bbfed1c1
parent86defcbe3f6c54a31dc898cb3adb4a3b25f1eb1a
difftool: sanitize $workdir as early as possible

The double-slash fixup on the $workdir variable was being
performed just-in-time to avoid double-slashes in symlink
targets, but the rest of the code was silently using paths with
embedded "//" in them.

A recent user-reported error message contained double-slashes.
Eliminate the issue by sanitizing inputs as soon as they arrive.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-difftool.perl