avoid crashing tilde expansion on user who does not exist
authorJoey Hess <joeyh@joeyh.name>
Wed, 13 Oct 2021 01:17:13 +0000 (21:17 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 13 Oct 2021 13:16:36 +0000 (09:16 -0400)
commitb36cc0320ecc4c328ba8bdbb8c9d15879ab52ff9
tree8a7c5e27489d90069e7d29247ce2c038a0eb13eb
parent3b5ac2d0d190b5bd91c745c3a79e8dc1e7dfe385
avoid crashing tilde expansion on user who does not exist

git does not crash when there's a remote configured for a user who does
not exist, and this prevents git-annex from crashing too. Consider that
a user might exist on one system but not another, and the git repo be
moved between systems. So not crashing is desirable.

Note that git fetch seems to mishandle a remote path like ~foo/bar
when the user does not exist. While it does access ./~foo/bar,
and gets as far as running git-upload-pack on the path,
it then complains there is no such repo. So different parts of git seem
to be doing different things in that edge case. Anyway, git-annex does
not need to be bug-for-bug compatible with git.

Sponsored-by: Jack Hill on Patreon
CHANGELOG
Git/Construct.hs