]> git.ipfire.org Git - thirdparty/git.git/commit - t/t0060-path-utils.sh
t0060: add tests for prefix_path when path begins with work tree
authorMartin Erik Werner <martinerikwerner@gmail.com>
Tue, 4 Feb 2014 14:25:18 +0000 (15:25 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 4 Feb 2014 20:08:47 +0000 (12:08 -0800)
commite131daa4c6baa53aba22e5d8bc1defa83b443bf0
treeae5e28d1fb9508e2335e0b960b96590ea89a3797
parente5aa1fc472696bfc337b3f128d45c1ef2aba394d
t0060: add tests for prefix_path when path begins with work tree

One edge-case that isn't currently checked in the tests is the beginning
of the path matching the work tree, despite the target not actually
being the work tree, for example:

  path = /dir/repoa
  work_tree = /dir/repo

should fail since the path is outside the repo. However, if /dir/repoa
is in fact a symlink that points to /dir/repo, it should instead
succeed.

Add two tests covering these cases, since they might be potential
regression points.

Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
Reviewed-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0060-path-utils.sh