git-annex/doc
Joey Hess 95ca3bb022 Fix encoding of data written to git-annex branch. Avoid truncating unicode characters to 8 bits.
Allow any encoding to be used, as with filenames (but utf8 is the sane
choice). Affects metadata and repository descriptions, and preferred
content expressions.

The question of what's the right encoding for the git-annex branch is a
vexing one. utf-8 would be a nice choice, but this leaves the possibility
of bad data getting into a git-annex branch somehow, and this resulting in
git-annex crashing with encoding errors, which is a failure mode I want to
avoid.

(Also, preferred content expressions can refer to filenames, and filenames
can have any encoding, so limiting to utf-8 would not be ideal.)

The union merge code already took care to not assume any encoding for a
file. Except it assumes that any \n is a literal newline, and not part of
some encoding of a character that happens to contain a newline. (At least
utf-8 avoids using newline for anything except liternal newlines.)
Adapted the git-annex branch code to use this same approach.

Note that there is a potential interop problem with Windows, since
FileSystemEncoding doesn't work there, and instead things are always
decoded as utf-8. If someone uses non-utf8 encoding for data on the
git-annex branch, this can lead to an encoding error on windows. However,
this commit doesn't actually make that any worse, because the union merge
code would similarly fail with an encoding error on windows in that
situation.

This commit was sponsored by Kyle Meyer.
2014-05-27 14:16:33 -04:00
..
Android update some comments re ssh password entry on Android 2014-05-15 15:20:24 -04:00
android
assistant Added a comment 2014-05-25 15:10:34 +00:00
automatic_conflict_resolution Added a comment: auto conflict resolution 2014-04-19 17:26:11 +00:00
backends
bare_repositories
bugs Fix encoding of data written to git-annex branch. Avoid truncating unicode characters to 8 bits. 2014-05-27 14:16:33 -04:00
contact
copies
design update 2014-05-23 12:09:02 -04:00
devblog devblog 2014-05-26 18:10:32 -04:00
direct_mode
download
ekg
encryption removed 2014-04-12 03:51:56 +00:00
footer
forum Added a comment 2014-05-27 16:10:29 +00:00
how_it_works
install Added a comment 2014-05-27 16:08:14 +00:00
internals
license
links
metadata Added a comment 2014-03-17 19:32:39 +00:00
news cleanup old comments for old news entries 2014-05-17 13:48:38 -04:00
not Added a comment 2014-05-16 18:59:47 +00:00
polls
preferred_content note webapp 2014-04-24 14:14:34 -04:00
special_remotes removed 2014-05-21 04:07:59 +00:00
sync Added a comment 2014-05-15 19:54:54 +00:00
templates
testimonials
tips Added a comment 2014-05-24 18:29:03 +00:00
todo New todo: Chunks support in all special remotes 2014-05-26 14:06:57 +00:00
upgrades
use_case
users make links to internal pages instead of only github to allow cross-finding them all 2014-04-13 14:33:13 +00:00
videos
walkthrough remove setup_git page 2014-05-18 11:26:11 -04:00
Android.mdwn
assistant.mdwn
automatic_conflict_resolution.mdwn
backends.mdwn
bare_repositories.mdwn
bugs.mdwn reorg main bugs page; show moreinfo bugs here too 2014-05-24 16:43:14 -04:00
builds.mdwn
coding_style.mdwn
comments.mdwn
contact.mdwn
contribute.mdwn tweaks 2014-05-24 16:37:06 -04:00
copies.mdwn update for required content 2014-03-29 14:39:10 -04:00
design.mdwn
devblog.mdwn
direct_mode.mdwn
distributed_version_control.mdwn
download.mdwn
ekg.mdwn
encryption.mdwn
favicon.ico remove photoshop droppings and regenerate favion using a free tool 2014-03-16 16:05:27 -04:00
feeds.mdwn
forum.mdwn
future_proofing.mdwn
git-annex-shell.mdwn typo 2014-04-11 12:12:34 -04:00
git-annex.mdwn execute remote.<name>.annex-shell on remote, if set 2014-05-16 15:46:43 -04:00
git-union-merge.mdwn
how_it_works.mdwn
index.mdwn link to the haskell page, which has many teaching resources about it 2014-04-08 22:44:28 +00:00
install.mdwn add docker autobuilder container instructions, using propellor 2014-04-02 18:40:26 -04:00
internals.mdwn update for required content 2014-03-29 14:39:10 -04:00
license.mdwn
location_tracking.mdwn
logo-old-bw.svg
logo-old.png
logo-old.svg
logo-old_small.png
logo.mdwn
logo.svg
logo_16x16.png remove photoshop droppings and regenerate favion using a free tool 2014-03-16 16:05:27 -04:00
logo_32x32.png remove photoshop droppings and regenerate favion using a free tool 2014-03-16 16:05:27 -04:00
logo_small.png
meta.mdwn
metadata.mdwn 2014-04-07 11:46:18 +00:00
news.mdwn
not.mdwn
polls.mdwn
preferred_content.mdwn 2014-04-07 11:44:11 +00:00
privacy.mdwn
publicrepos.mdwn back to https clone url for downloads.kitenet.net; fixed 2014-04-30 20:59:15 -04:00
related_software.mdwn link to magit-annex 2014-03-22 17:28:05 -04:00
repomap.png
required_content.mdwn Added required content configuration. 2014-03-29 16:03:33 -04:00
scalability.mdwn
shortcuts.mdwn
sidebar.mdwn
sitemap.mdwn
special_remotes.mdwn ddar special remote 2014-05-15 16:32:44 -04:00
summary.mdwn
sync.mdwn
testimonials.mdwn
thanks.mdwn update 2014-05-02 15:09:38 -03:00
tips.mdwn
todo.mdwn link to roadmap 2014-03-31 15:16:35 +00:00
transferring_data.mdwn
trust.mdwn
upgrades.mdwn
users.mdwn
videos.mdwn back to https clone url for downloads.kitenet.net; fixed 2014-04-30 20:59:15 -04:00
walkthrough.mdwn remove setup_git page 2014-05-18 11:26:11 -04:00