This commit is contained in:
grawity@2ea26be48562f66fcb9b66307da72b1e2e37453f 2018-05-22 05:18:34 +00:00 committed by admin
parent 94310e2fc7
commit db2def89fe

View file

@ -0,0 +1,48 @@
### Please describe the problem.
I'm migrating certain files from SHA256E to SHA256, to avoid problems caused by inconsistent-case extensions, and by weird filenames which git-annex misdetects as part of the extension. The obvious approach, `annex migrate --to SHA256`, does not work as expected the new keys _still_ have the same extension appended. This kinda defeats the point.
I can work around this by migrating to another hash first (e.g. to SHA1), then back.
### What steps will reproduce the problem?
1. Have a SHA256E or SHA1E file
2. git annex migrate --backend=SHA256
### What version of git-annex are you using? On what operating system?
6.20180509-g0632c49c22, Linux
### Please provide any additional information below.
[[!format sh """
# If you can, paste a complete transcript of the problem occurring here.
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
$ ls -l
lrwxrwxrwx 1 grawity grawity 211 May 2 07:58 EN_EXCH2003_ENT.ISO -> ../../../.git/annex/objects/41/Fq/SHA256E-s391118848--3b0a03ce8a821c98de7d3e67f9664f55b4bb7e13855721db993881bad501caf3.ISO/SHA256E-s391118848--3b0a03ce8a821c98de7d3e67f9664f55b4bb7e13855721db993881bad501caf3.ISO
$ git annex migrate --backend=SHA256 --force
migrate EN_EXCH2003_ENT.ISO (checksum...) ok
(recording state in git...)
$ ls -l
lrwxrwxrwx 1 grawity grawity 209 May 22 08:15 EN_EXCH2003_ENT.ISO -> ../../../.git/annex/objects/09/3P/SHA256-s391118848--3b0a03ce8a821c98de7d3e67f9664f55b4bb7e13855721db993881bad501caf3.ISO/SHA256-s391118848--3b0a03ce8a821c98de7d3e67f9664f55b4bb7e13855721db993881bad501caf3.ISO
$ git annex migrate --backend=SHA1
migrate EN_EXCH2003_ENT.ISO (checksum...) (checksum...) ok
(recording state in git...)
$ git annex migrate --backend=SHA256
migrate EN_EXCH2003_ENT.ISO (checksum...) (checksum...) ok
(recording state in git...)
$ ls -l
lrwxrwxrwx 1 grawity grawity 201 May 22 08:17 EN_EXCH2003_ENT.ISO -> ../../../.git/annex/objects/xX/GW/SHA256-s391118848--3b0a03ce8a821c98de7d3e67f9664f55b4bb7e13855721db993881bad501caf3/SHA256-s391118848--3b0a03ce8a821c98de7d3e67f9664f55b4bb7e13855721db993881bad501caf3
# End of transcript or log.
"""]]
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)