CI to automate build of cargo lockfiles on different Alpine releases for git-annex aports https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/community/git-annex
Find a file
Joey Hess 3a66cd715f
avoid making absolute git remote path relative
When a git remote is configured with an absolute path, use that path,
rather than making it relative. If it's configured with a relative path,
use that.

Git.Construct.fromPath changed to preserve the path as-is,
rather than making it absolute. And Annex.new changed to not
convert the path to relative. Instead, Git.CurrentRepo.get
generates a relative path.

A few things that used fromAbsPath unncessarily were changed in passing to
use fromPath instead. I'm seeing fromAbsPath as a security check,
while before it was being used in some cases when the path was
known absolute already. It may be that fromAbsPath is not really needed,
but only git-annex-shell uses it now, and I'm not 100% sure that there's
not some input that would cause a relative path to be used, opening a
security hole, without the security check. So left it as-is.

Test suite passes and strace shows the configured remote url is used
unchanged in the path into it. I can't be 100% sure there's not some code
somewhere that takes an absolute path to the repo and converts it to
relative and uses it, but it seems pretty unlikely that the code paths used
for a git remote would call such code. One place I know of is gitAnnexLink,
but I'm pretty sure that git remotes never deal with annex symlinks. If
that did get called, it generates a path relative to cwd, which would have
been wrong before this change as well, when operating on a remote.
2021-02-08 13:18:01 -04:00
Annex suggest when user may want annex.stalldetection 2021-02-03 15:57:19 -04:00
Assistant add searchPathContents 2021-02-02 19:06:15 -04:00
Backend convert getFileSize to RawFilePath 2020-11-05 11:32:57 -04:00
Build add searchPathContents 2021-02-02 19:06:15 -04:00
CmdLine suggest when user may want annex.stalldetection 2021-02-03 15:57:19 -04:00
Command avoid making absolute git remote path relative 2021-02-08 13:18:01 -04:00
Config add: Significantly speed up adding lots of non-large files to git 2021-01-04 13:12:28 -04:00
Database add: Significantly speed up adding lots of non-large files to git 2021-01-04 13:12:28 -04:00
debian Enable building with git-annex benchmark by default 2020-10-02 13:57:10 -04:00
doc avoid making absolute git remote path relative 2021-02-08 13:18:01 -04:00
Git avoid making absolute git remote path relative 2021-02-08 13:18:01 -04:00
Limit split ProvidedInfo and UserProvidedInfo 2020-09-28 12:12:38 -04:00
Logs suggest when user may want annex.stalldetection 2021-02-03 15:57:19 -04:00
Messages simplify transferr protocol 2020-12-11 12:52:22 -04:00
P2P suggest when user may want annex.stalldetection 2021-02-03 15:57:19 -04:00
Remote avoid making absolute git remote path relative 2021-02-08 13:18:01 -04:00
RemoteDaemon add back git-annex branch read cache 2020-07-06 12:22:33 -04:00
standalone bump filepath-bytestring dep 2020-11-11 11:49:19 -04:00
static Revert "remove newlines from static js and css" 2014-06-13 02:20:39 -04:00
templates cache the serialization of a Key 2019-11-22 17:49:16 -04:00
Test improve display of test failures 2020-11-24 17:17:09 -04:00
Types suggest when user may want annex.stalldetection 2021-02-03 15:57:19 -04:00
Upgrade Git.Queue: allow providing git common options like -c 2021-01-04 12:51:55 -04:00
Utility support fuzzy matching of addon commands 2021-02-02 19:37:09 -04:00
.ghci avoid ghci warning on tabs 2019-01-21 12:35:44 -04:00
.gitattributes update changelog location 2016-08-22 23:54:11 -04:00
.gitignore stack.yaml: Updated to lts-16.10 2020-08-24 14:11:37 -04:00
.mailmap alias for Yaroslav @ yahoo to mailmap 2015-09-09 12:38:59 -04:00
Annex.hs avoid making absolute git remote path relative 2021-02-08 13:18:01 -04:00
Assistant.hs Fix build on Windows 2020-11-19 12:33:00 -04:00
Backend.hs more RawFilePath conversion 2020-10-29 14:20:57 -04:00
bash-completion.bash bash completion fix 2018-11-12 13:23:05 -04:00
Benchmark.hs move global options handling closer to Command definitions 2021-02-02 15:55:45 -04:00
BuildFlags.hs Removed the S3 and WebDAV build flags 2020-09-08 12:42:59 -04:00
BuildInfo.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CHANGELOG avoid making absolute git remote path relative 2021-02-08 13:18:01 -04:00
CmdLine.hs support fuzzy matching of addon commands 2021-02-02 19:37:09 -04:00
Command.hs addon commands 2021-02-02 16:32:49 -04:00
Common.hs finish fixing removeLink on windows 2020-11-24 13:20:44 -04:00
Config.hs more RawFilePath conversion 2020-10-29 10:50:29 -04:00
COPYRIGHT update year 2021-01-04 12:45:19 -04:00
Creds.hs finish fixing removeLink on windows 2020-11-24 13:20:44 -04:00
Crypto.hs fix strictness issue 2020-06-16 17:09:34 -04:00
git-annex.cabal automatic stall detection 2021-02-03 13:33:57 -04:00
git-annex.hs include git-annex-shell back in 2019-12-02 11:51:52 -04:00
git-union-merge.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Git.hs avoid crashing when there are remotes using unparseable urls 2021-01-18 14:59:08 -04:00
Key.hs add newtypes for QuickCheck to avoid LANG=C issues 2020-11-09 20:21:18 -04:00
Limit.hs fix --time-limit 2021-01-04 15:57:11 -04:00
Logs.hs mincopies 2021-01-06 14:15:19 -04:00
Makefile OSXMkLibs: skip @loader_path 2020-12-15 12:47:24 -04:00
Messages.hs extend transferrer protocol to send progress bar total size updates 2020-12-11 12:42:28 -04:00
NEWS fix dist in latest NEWS entry 2020-09-14 12:05:12 -04:00
README use https 2014-11-06 14:20:10 -04:00
Remote.hs Behavior change: --trust option no longer overrides trust 2021-01-07 10:34:57 -04:00
Setup.hs Added git-remote-tor-annex, which allows git pull and push to the tor hidden service. 2016-11-21 17:27:38 -04:00
stack.yaml update to lts-16.27 2020-12-29 13:51:08 -04:00
Test.hs test: avoid unnecessary tests of variants of git remote 2021-01-11 13:43:55 -04:00
Types.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Upgrade.hs propagate git-annex -c on to transferrer child process 2020-12-15 11:36:25 -04:00

git-annex allows managing files with git, without checking the file
contents into git. While that may seem paradoxical, it is useful when
dealing with files larger than git can currently easily handle, whether due
to limitations in memory, checksumming time, or disk space.

For documentation, see doc/ or <https://git-annex.branchable.com/>