git-annex/Utility/Path
Joey Hess 4bf7940d6b
fileRef: make paths relative and simplified
Fix behavior of several commands, including reinject, addurl, and rmurl
when given an absolute path to an unlocked file, or a relative path that
leaves and re-enters the repository.

To avoid slowing down all the cases where the paths are already ok
with an unncessary call to getCurrentDirectory, put in an optimisation
in relPathCwdToFile. That will probably also speed up other parts of
git-annex by some small amount, but I have not benchmarked.

Note that I did not convert branchFileRef, because it seems likely that
it will be used with a file that is not provided by the user, so is already
in a sane format. This is certainly true for the way git-annex uses it,
though maybe arguable to the extent Git.Ref is a reusable library.
2021-05-07 13:25:59 -04:00
..
AbsRel.hs fileRef: make paths relative and simplified 2021-05-07 13:25:59 -04:00
Max.hs explict export lists 2019-11-21 16:08:37 -04:00
Tests.hs fix problem on windows with newly rewritten prop_relPathDirToFileAbs_basics 2021-01-22 14:30:48 -04:00