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 eb42935e58
Windows: Fix CRLF handling in some log files
In particular, the mergedrefs file was written with CR added to each line,
but read without CRLF handling. This resulted in each update of the file
adding CR to each line in it, growing the number of lines, while also
preventing the optimisation from working, so it remerged unncessarily.

writeFile and readFile do NewlineMode translation on Windows. But the
ByteString conversion prevented that from happening any longer.

I've audited for other cases of this, and found three more
(.git/annex/index.lck, .git/annex/ignoredrefs, and .git/annex/import/). All
of those also only prevent optimisations from working. Some other files are
currently both read and written with ByteString, but old git-annex may have
written them with NewlineMode translation. Other files are at risk for
breakage later if the reader gets converted to ByteString.

This is a minimal fix, but should be enough, as long as I remember to use
fileLines when splitting a ByteString into lines. This leaves files written
using ByteString without CR added, but that's ok because old git-annex has
no difficulty reading such files.

When the mergedrefs file has gotten lines that end with "\r\r\r\n", this
will eventually clean it up. Each update will remove a single trailing CR.

Note that S8.lines is still used in eg Command.Unused, where it is parsing
git show-ref, and similar in Git/*. git commands don't include CR in their
output so that's ok.

Sponsored-by: Joshua Antonishen on Patreon
2023-10-30 14:23:23 -04:00
Annex Windows: Fix CRLF handling in some log files 2023-10-30 14:23:23 -04:00
Assistant RawFilePath conversion 2023-10-26 13:58:49 -04:00
Backend filter out control characters in all other Messages 2023-04-11 12:58:01 -04:00
Build use unshorted hash in version 2023-09-20 09:31:59 -04:00
CmdLine avoid double RawFilePath conversion 2023-10-26 13:41:17 -04:00
Command push RawFilePath down into Annex.ReplaceFile 2023-10-26 13:36:49 -04:00
Config use status --ignore-submodules in configureSmudgeFilter 2022-12-20 16:02:42 -04:00
Database avoid unused import 2023-10-26 14:00:21 -04:00
debian Removed the vendored git-lfs and the GitLfs build flag 2023-08-28 13:12:31 -04:00
doc Merge branch 'master' of ssh://git-annex.branchable.com 2023-10-27 17:47:50 -04:00
Git RawFilePath conversion 2023-10-26 13:58:49 -04:00
Limit initial implementation of --explain 2023-07-25 16:52:57 -04:00
Logs Windows: Fix CRLF handling in some log files 2023-10-30 14:23:23 -04:00
Messages factor out maybeAddJSONField 2023-05-08 16:15:41 -04:00
P2P filter out control characters in error messages 2023-04-10 13:50:51 -04:00
Remote eliminate s2w8 and w82s 2023-10-26 13:12:57 -04:00
RemoteDaemon remove unused import 2023-08-28 12:35:57 -04:00
standalone enable parallel ghc for building git-annex 2023-09-26 13:46:44 -04:00
static
templates Apply codespell -w throughout 2023-03-17 15:14:58 -04:00
Test display summary after concurrent output is complete 2023-10-26 14:19:41 -04:00
Types simplify base64 to only use ByteString 2023-10-26 13:10:05 -04:00
Upgrade filter out control characters in all other Messages 2023-04-11 12:58:01 -04:00
Utility add PackageImports 2023-10-30 14:10:46 -04:00
.appveyor.yml windows back to lts-18.13 temporarily 2023-08-02 12:49:38 -04:00
.codespellrc keyspell ignore tmp directory 2023-03-17 15:21:31 -04:00
.ghci turn of PackageImports in cabal file 2022-02-25 13:16:36 -04:00
.gitattributes
.gitignore ignore git-annex-build-deps files from dpkg-genbuilddeps 2023-01-29 11:29:51 -04:00
.mailmap
Annex.hs initial implementation of --explain 2023-07-25 16:52:57 -04:00
Assistant.hs
Backend.hs filter out control characters in warning messages 2023-04-10 15:55:44 -04:00
bash-completion.bash
Benchmark.hs
BuildFlags.hs Support being built with crypton rather than cryptonite 2023-09-21 12:43:42 -04:00
BuildInfo.hs
CHANGELOG Windows: Fix CRLF handling in some log files 2023-10-30 14:23:23 -04:00
CmdLine.hs Adapt code to optparse-applicative 0.18.1 and later. 2023-06-21 11:51:04 -04:00
Command.hs uninit: Support --json and --json-error-messages 2023-05-11 13:43:02 -04:00
Common.hs Windows: Support long filenames in more (possibly all) of the code 2023-03-01 15:55:58 -04:00
Config.hs added an optional cost= configuration to all special remotes 2023-01-12 13:42:28 -04:00
COPYRIGHT Removed the vendored git-lfs and the GitLfs build flag 2023-08-28 13:12:31 -04:00
Creds.hs simplify base64 to only use ByteString 2023-10-26 13:10:05 -04:00
Crypto.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
git-annex.cabal sqlite datbase for importfeed 2023-10-23 16:46:22 -04:00
git-annex.hs sanitize control characters in main thread fatal exceptions 2023-04-12 14:21:53 -04:00
git-union-merge.hs
Git.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
Key.hs convert Key to ShortByteString 2021-10-05 20:20:08 -04:00
Limit.hs Fix behavior of onlyingroup 2023-08-07 13:05:11 -04:00
Logs.hs
Makefile remove vim dev hack 2023-10-20 12:50:31 -04:00
Messages.hs display explanations in --debug too 2023-07-31 13:06:40 -04:00
NEWS prep release 2023-06-26 10:41:36 -04:00
README improve description 2022-01-06 12:24:27 -04:00
Remote.hs convert checkAvailable to use availability rather than localpath 2023-08-16 15:57:30 -04:00
Setup.hs Setup.hs: Stop installing man pages, desktop files, and the git-annex-shell and git-remote-tor-annex symlinks 2023-08-01 15:08:56 -04:00
stack-lts-18.13.yaml enable parallel ghc for building git-annex 2023-09-26 13:46:44 -04:00
stack.yaml enable parallel ghc for building git-annex 2023-09-26 13:46:44 -04:00
Test.hs simplify base64 to only use ByteString 2023-10-26 13:10:05 -04:00
Types.hs
Upgrade.hs don't say a supported version is unsupported 2023-10-09 14:26:24 -04:00

git-annex allows managing large files with git, without storing the file
contents in git. It can sync, backup, and archive your data, offline
and online. Checksums and encryption keep your data safe and secure. Bring
the power and distributed nature of git to bear on your large files with
git-annex.

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