From c489b471d5e5dbc5c3d15b425f25f096679502c9 Mon Sep 17 00:00:00 2001 From: kyle Date: Wed, 14 Apr 2021 20:44:23 +0000 Subject: [PATCH 1/3] bug: init crash with remote name other than "origin" --- ..._annex-init_crash_when_remote_name_is.mdwn | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 doc/bugs/crippledfs__58___annex-init_crash_when_remote_name_is.mdwn diff --git a/doc/bugs/crippledfs__58___annex-init_crash_when_remote_name_is.mdwn b/doc/bugs/crippledfs__58___annex-init_crash_when_remote_name_is.mdwn new file mode 100644 index 0000000000..8ea7d1bc8d --- /dev/null +++ b/doc/bugs/crippledfs__58___annex-init_crash_when_remote_name_is.mdwn @@ -0,0 +1,49 @@ +git-clone makes it easy to specify a name other than "origin" via the +`--origin` option, and, as of Git 2.30.0, via the +`clone.defaultRemoteName` configuration option. Running `git annex +init` in a clone on a system where git-annex sets +`annex.crippledfilesystem` leads to a crash due to a hard-coded +"refs/remotes/origin". + +[[!format sh """ +cd "$(mktemp -d "${TMPDIR:-/tmp}"/ga-XXXXXXX)" || exit 1 + +export GIT_CONFIG_PARAMETERS="'annex.crippledfilesystem=true'" + +git version +git annex version | head -1 + +git init -q a +git -C a commit -q --allow-empty -m c0 +git -C a annex init + +git clone --origin=not-origin a b +git -C b annex init +"""]] + +``` +git version 2.31.1.424.g95a8dafae5 +git-annex version: 8.20210331-g17646b0b3 +init (scanning for unlocked files...) + + Entering an adjusted branch where files are unlocked as this filesystem does not support locked files. + +Switched to branch 'adjusted/master(unlocked)' +ok +(recording state in git...) +Cloning into 'b'... +done. +init (merging not-origin/git-annex into git-annex...) +(scanning for unlocked files...) +fatal: refs/remotes/origin/master: not a valid SHA1 + +git-annex: git [Param "update-ref",Param "refs/heads/master",Param "refs/remotes/origin/master"] failed +CallStack (from HasCallStack): + error, called at ./Git/Command.hs:42:17 in main:Git.Command +failed +git-annex: init: 1 failed +``` + +Thanks in advance for taking a look. + +[[!tag projects/datalad]] From 3aa4cc9d6f6ec01a8226ff99c165c88fa7d5f95c Mon Sep 17 00:00:00 2001 From: yarikoptic Date: Wed, 14 Apr 2021 20:46:11 +0000 Subject: [PATCH 2/3] Added a comment --- ...mment_7_b57afb61d622d9f5b2555e7d80d0ff4e._comment | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/todo/import_from_directory_does_not_use_cp_--reflink__63___/comment_7_b57afb61d622d9f5b2555e7d80d0ff4e._comment diff --git a/doc/todo/import_from_directory_does_not_use_cp_--reflink__63___/comment_7_b57afb61d622d9f5b2555e7d80d0ff4e._comment b/doc/todo/import_from_directory_does_not_use_cp_--reflink__63___/comment_7_b57afb61d622d9f5b2555e7d80d0ff4e._comment new file mode 100644 index 0000000000..cc412605b9 --- /dev/null +++ b/doc/todo/import_from_directory_does_not_use_cp_--reflink__63___/comment_7_b57afb61d622d9f5b2555e7d80d0ff4e._comment @@ -0,0 +1,12 @@ +[[!comment format=mdwn + username="yarikoptic" + avatar="http://cdn.libravatar.org/avatar/f11e9c84cb18d26a1748c33b48c924b4" + subject="comment 7" + date="2021-04-14T20:46:05Z" + content=""" +> Implemented CoW for directory special remote, comprehensively. + +woohoo -- I will give it a shot! (might as well just interrupt ongoing \"process\") + +it is good that it copies content -- that is the point for use of CoW here - to gain a full copy of the content virtually at no (storage) cost, so if original directory gets it changed - its copy would be all nicely versioned etc in the git-annex land ;) +"""]] From 4c3d8241ae56838ea109c40dbfedc21584ecc037 Mon Sep 17 00:00:00 2001 From: kyle Date: Wed, 14 Apr 2021 21:26:32 +0000 Subject: [PATCH 3/3] crippledfilesystem override not needed --- ...crippledfs__58___annex-init_crash_when_remote_name_is.mdwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/bugs/crippledfs__58___annex-init_crash_when_remote_name_is.mdwn b/doc/bugs/crippledfs__58___annex-init_crash_when_remote_name_is.mdwn index 8ea7d1bc8d..1a4ba82657 100644 --- a/doc/bugs/crippledfs__58___annex-init_crash_when_remote_name_is.mdwn +++ b/doc/bugs/crippledfs__58___annex-init_crash_when_remote_name_is.mdwn @@ -46,4 +46,8 @@ git-annex: init: 1 failed Thanks in advance for taking a look. +Update: Before posting, I should have tried to trigger this without +overriding `annex.crippledfilesystem`. Entering an adjusted branch in +`a` is sufficient to trigger this. + [[!tag projects/datalad]]