From: kyle Date: Wed, 14 Apr 2021 20:44:23 +0000 (+0000) Subject: bug: init crash with remote name other than "origin" X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~91^2~534^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c489b471d5e5dbc5c3d15b425f25f096679502c9;p=git-annex.git bug: init crash with remote name other than "origin" --- 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]]