fold parseLinkTarget into parseLinkTargetOrPointer
authorJoey Hess <joeyh@joeyh.name>
Wed, 23 Feb 2022 16:24:09 +0000 (12:24 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 23 Feb 2022 16:30:32 +0000 (12:30 -0400)
commit4cd9325c2ceedd55d94a6a5aff330686f746f21c
treeac35cd34f58e097874ffc183a66ac0dda95e8bc9
parent38816a9ae93151789a196b3f7dc9519012aac7c3
fold parseLinkTarget into parseLinkTargetOrPointer

Only one place remained that differentiated between them.

It is the case that a symlink target that happens to contain a newline
somehow will be treated as a link to a key truncated at the newline.
This is super unlikely to happen, and since a key cannot actually
contain a newline, it's as good a behavior as any. Anyway, this commit
does not change the behavior there, although arguably it should be
changed. Note that getAnnexLinkTarget does prevent a symlink target
containing a newline.

Sponsored-by: Dartmouth College's Datalad project
Annex/Link.hs
Assistant/Threads/Watcher.hs