The answers sit in a collapsed block, without explanations. Question 1 now
names the work tree's checked-out branch and asks separately whether the
sibling has each file's content, where the surprise lies.
The post now builds on one distinction: reading should cost nothing, writing
must leave the stored version intact. A locked file serves both through a
symlink; on Windows git-annex does not use symlinks, so master holds
path-text files there, and the adjusted branch provides an unlocked copy of
every annexed file instead. git's records (a symlink with the path, or a
regular file with a pointer) are named as such and kept apart from what
lands in the work tree.
Corrections from review:
- The simulation's false "modified" is no compile-time switch.
core.symlinks=false alone reproduces it, so the no-symlink test leg sets
just that. On Linux git-annex's filter fills master's path-text files
with their content; on Windows the same replacement fails because git
holds the file open, and git-annex ignores the error.
- core.symlinks=false is simply the setting on Windows; who sets it is not
the point.
- A plain git commit reaches master at the next update, push, or save that
commits something.
- get_corresponding_branch() is paired with get_active_branch().
- test_unlock is named as the test that skips its checks.
- When git status puts the content back after a plain reset is a matter of
timing on Linux and never happens on Windows; that detail moved to a
footnote, and the main text gives git checkout -- . as the reliable way.
Also: shortcodes renamed in the post, "normal branch" and "crippled"
replaced by what is meant, the testing section opens with the properties
tests rely on, and strategy 3 is about reproducing Windows on Linux.
Examples: a cat in the first example shows that a locked file is readable,
git checkout replaces git switch, example 14 names its files kept.bin and
discarded.bin after their role, and column comments are shorter. The
downloadable scripts start new repositories on master whatever
init.defaultBranch says.
dlcols only matched the string "true", so single=true without quotes built
fine but gave two columns. Its style block was repeated with every use; in
assets/css/extended/ PaperMod bundles it into the site stylesheet once.
dlmd and dldetails get a comment on why dlmd is needed and why dldetails
is not Hugo's built-in details, which drops the id that a link points to.
cols, col, md and details become dlcols, dlcol, dlmd and dldetails, so that
they cannot collide with shortcodes Hugo adds later: Hugo has shipped its own
details since v0.140.0, which ours replaced site-wide.
How git-annex's adjusted branch works on Windows, where resetting it
breaks, and how to test for it. Every example comes from one story run
on Linux and on Windows; story-linux.sh and story-windows.sh let readers
replay it.
cols/col render two code columns next to each other (one full-width
column with single="true"); details/md give a collapsible block whose
content may hold both markdown and shortcodes. PaperMod's collapse
markdownifies its content and so drops the HTML of nested shortcodes.