Merge branch 'master' of ssh://git-annex.branchable.com

This commit is contained in:
Joey Hess 2015-09-03 11:11:13 -07:00
commit d570b5c0ff
6 changed files with 94 additions and 0 deletions

View file

@ -42,4 +42,6 @@ Debian sid 5.20150812-2
# End of transcript or log.
"""]]
> [[fixed|done]] --[[Joey]]

View file

@ -0,0 +1,7 @@
[[!comment format=mdwn
username="https://me.yahoo.com/a/EbvxpTI_xP9Aod7Mg4cwGhgjrCrdM5s-#7c0f4"
subject="thanks for the explanation"
date="2015-09-03T00:55:38Z"
content="""
Thanks for chewing it up for me. So FS is not considered crippled even if you can commit a crime as a privileged user. I will mark it back now as fixed ;)
"""]]

View file

@ -0,0 +1,40 @@
### Please describe the problem.
I was thinking to answer Emanuele's question in forum (http://git-annex.branchable.com/forum/test_whether_a_file_is_already_annexed/) but realized that 'info' is not the way :-/ (whereis could be used I guess)
### What version of git-annex are you using? On what operating system?
5.20150826+gitg87972f5-1~ndall+1
### Please provide any additional information below.
[[!format sh """
$> git annex indirect
commit ok
indirect 1.dat ok
indirect ok
ok
$> git annex info 1.dat
file: 1.dat
size: 4 bytes
key: SHA256E-s4--181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b.dat
$> git annex direct
commit
On branch master
nothing to commit, working directory clean
ok
direct 1.dat ok
direct ok
$> git annex info 1.dat
git-annex: 1.dat is not a directory or an annexed file or a remote or a uuid
"""]]
### 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)

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="https://me.yahoo.com/a/EbvxpTI_xP9Aod7Mg4cwGhgjrCrdM5s-#7c0f4"
subject="whereis"
date="2015-09-03T01:07:32Z"
content="""
Thought to say that you could use 'info' but http://git-annex.branchable.com/bugs/git_annex_info_is_reporting_file_as_not_annexed_in_direct_mode/ .
What about 'git annex whereis FILE' ? it should be empty output for non-annexed file
"""]]

View file

@ -0,0 +1,22 @@
[[!comment format=mdwn
username="emanuele.olivetti@47d88ed185b03191e25329caa6fabc2efb3118b2"
nickname="emanuele.olivetti"
subject="not whereis"
date="2015-09-03T07:44:49Z"
content="""
First of all thank you for the answer and the bug report. Unfortunately git-annex whereis seems not to be the answer to my problem, because it works only when queried on already annexed files, while I'd like to test the yet-not-annexed ones. Here's an example using whereis:
git-annex whereis SAM_7198.m4v # SAM_7198.m4v is an already annexed files in the current directory, so within the repository: whereis works well
whereis SAM_7198.m4v (2 copies)
5dd7f891-579a-45c6-a5bf-3ca42e3a5f9a -- laptop [here]
ebf56bea-2970-42b1-bace-9d72ac9ed8d1 -- emanuele@desktop:/home/emanuele/annex [origin]
ok
cp -L SAM_7198.m4v zzz # creating a copy of a that file
git-annex whereis zzz # output is empty, so the file was not found, despite having the same content of SAM_7198.m4v and being in the repo dir
cp -L SAM_7198.m4v /tmp/ # copying the annexed file outside the repo
git-annex whereis /tmp/SAM_7198.m4v
fatal: /tmp/SAM_7198.m4v: '/tmp/SAM_7198.m4v' is outside repository
"""]]

View file

@ -0,0 +1,15 @@
[[!comment format=mdwn
username="CandyAngel"
subject="comment 3"
date="2015-09-03T08:05:52Z"
content="""
Hm.. having some kind of exposure of the key generation code on the command line would actually be pretty useful. So you can do something like:
find -type f | xargs git annex genkey --format '${key} ${file}'
Probably worth a TODO, really.
Regarding your situation, one way of doing it would be to recursively copy the photo directory as hardlinks, `git annex import --clean-duplicates` the hardlinked copies, then diff the directories. This would give you a list of removals and those removals are already in the repo.
Or if you just want to remove them, just run '*git annex import --clean-duplicates*' on the original photos directory. **NOTE: There was recently an issue with git-annex deleting files that it didn't have any known copies of, so a recent version is highly recommended if using --clean-duplicates.**
"""]]