From 8eb4a825695339290c4835d46fc9565488c4d99e Mon Sep 17 00:00:00 2001 From: "https://openid.jorsn.eu/" Date: Mon, 30 Mar 2020 22:41:17 +0000 Subject: [PATCH] --- ...upwanted_and_groupwanted__61__nothing.mdwn | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 doc/bugs/drop_file_denied_with_required__61__groupwanted_and_groupwanted__61__nothing.mdwn diff --git a/doc/bugs/drop_file_denied_with_required__61__groupwanted_and_groupwanted__61__nothing.mdwn b/doc/bugs/drop_file_denied_with_required__61__groupwanted_and_groupwanted__61__nothing.mdwn new file mode 100644 index 0000000000..e2c5fa1ce2 --- /dev/null +++ b/doc/bugs/drop_file_denied_with_required__61__groupwanted_and_groupwanted__61__nothing.mdwn @@ -0,0 +1,135 @@ +### Please describe the problem. + +git-annex denies dropping a file because it be required, but `required` = `groupwanted` and `groupwanted` = `nothing`. + +It seems that this is regardless of the value of `groupwanted`. I also tried with other expressions. + +### What steps will reproduce the problem? + +[[!format sh """ +#!/bin/sh +set -x + +# init repos & add file +mkdir local remote +cd remote +git init && git annex init remote +cd ../local +git init && git annex init local +touch file +ls +git annex add . +git remote add remote ../remote + +# repo settings +git annex group remote g +git annex groupwanted g nothing +git annex required remote groupwanted + +# test +git annex whereis file +git annex copy file --to=remote --auto # doesn't copy, as expected +git annex whereis file +git annex copy file --to=remote # copies, as expected +git annex whereis file +git annex drop file --from=remote # ERROR: drop denied +git annex whereis file + +# test using required=nothing directly +git annex required remote nothing +git annex drop file --from=remote # drops, as expected +git annex whereis file +"""]] + + +### What version of git-annex are you using? On what operating system? + + +* version 7.20190819 on NixOS 19.09 as well as version 8.20200309 from unstable Nixpkgs +* local repository version: 7 (makes no difference whether 5 or 7) + + +### Please provide any additional information below. + +Which additional information could be of use? The transcript is pretty much above. + +[[!format sh """ +# transcript +[user@host annex-test]$ mkdir local remote +[user@host annex-test]$ cd remote +[user@host remote]$ git init +Initialized empty Git repository in /home/johannes/annex-test/remote/.git/ +[user@host remote]$ git annex init remote +init remote ok +(recording state in git...) +[user@host remote]$ cd ../local +[user@host local]$ git init +Initialized empty Git repository in /home/johannes/annex-test/local/.git/ +[user@host local]$ git annex init local +init local ok +(recording state in git...) +[user@host local]$ touch file +[user@host local]$ ls +file +[user@host local]$ git annex add . +add file + + +ok +(recording state in git...) +[user@host local]$ git remote add remote ../remote +[user@host local]$ git annex group remote g +group remote ok +(recording state in git...) +[user@host local]$ git annex groupwanted g nothing +groupwanted g ok +(recording state in git...) +[user@host local]$ git annex required remote groupwanted +required remote ok +(recording state in git...) +[user@host local]$ git annex whereis file +whereis file (1 copy) + a886389d-ebd5-489c-804b-1bcbddf2c9c5 -- local [here] +ok +[user@host local]$ git annex copy file --to=remote --auto +[user@host local]$ git annex whereis file +whereis file (1 copy) + a886389d-ebd5-489c-804b-1bcbddf2c9c5 -- local [here] +ok +[user@host local]$ git annex copy file --to=remote +copy file (to remote...) (checksum...) ok +(recording state in git...) +[user@host local]$ git annex whereis file +whereis file (2 copies) + 343d87b7-e21a-4f38-b9b6-66b01aaa7995 -- remote + a886389d-ebd5-489c-804b-1bcbddf2c9c5 -- local [here] +ok +[user@host local]$ git annex drop file --from=remote +drop remote file + That file is required content, it cannot be dropped! + + (Use --force to override this check, or adjust required content configuration.) +failed +git-annex: drop: 1 failed +[user@host local]$ git annex whereis file +whereis file (2 copies) + 343d87b7-e21a-4f38-b9b6-66b01aaa7995 -- remote + a886389d-ebd5-489c-804b-1bcbddf2c9c5 -- local [here] +ok +[user@host local]$ git annex required remote nothing +required remote ok +(recording state in git...) +[user@host local]$ git annex drop file --from=remote +drop remote file ok +(recording state in git...) +[user@host local]$ git annex whereis file +whereis file (1 copy) + a886389d-ebd5-489c-804b-1bcbddf2c9c5 -- local [here] +ok +# 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) + +I had, some time ago I synced my phone with it. I stopped because of the painful crippled file system there, and the annex was so large that the phone was slow. But I always wanted to restart annexing, to archive and partially checkout my libraries, and maybe do the phone sync right (probably via a special remote)! It seems to be THE tool as soon as a repo is split over multiple disks.