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

This commit is contained in:
Joey Hess 2015-05-04 09:13:12 -04:00
commit 39f4ee3fb8
3 changed files with 156 additions and 0 deletions

View file

@ -0,0 +1,105 @@
### Please describe the problem.
When using "`git annex addurl --file`" with an ftp url, the committed
file is deleted after dropping the contents with --force (because
git-annex can't determine if the ftp server contains a valid copy) and
executing "`git annex get`". It's the "`git annex get`" command that
deletes the file.
This does not happen when using an http url.
### What steps will reproduce the problem?
`git clone https://gist.github.com/sunny256/24f6c29645efd0aab4d9`
and execute the bash script `runme`. There's more info in a long comment
there, plus various flags you can enable/disable to test under different
conditions.
### What version of git-annex are you using? On what operating system?
Using the newest git-annex from <https://downloads.kitenet.net/.git/> in
directory git-annex/linux/current/, 5.20150420-gb0ebb23.
Have tested with versions way back to v5.20131221, they all behave the
same.
Using Debian GNU/Linux 7.8 (wheezy) on x86_64 with brand new git 2.4.0.
### 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
$ ./runme
================== git init ==================
Initialized empty Git repository in /home/sunny/src/git/ga-bug/tmpdirawedsfkn/.git/
================== git annex init ==================
init ok
(recording state in git...)
================== git commit, empty start commit ==================
[master (root-commit) 6d5d623] Empty startcommit
================== git annex addurl ==================
addurl README (downloading ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README ...)
--2015-05-02 03:28:59-- ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README
=> '.git/annex/tmp/URL--ftp&c%%ftp.funet.fi%pub%Linux%mirrors%debian%README'
Resolving ftp.funet.fi (ftp.funet.fi)... 193.166.3.2, 2001:708:10:9::20:2
Connecting to ftp.funet.fi (ftp.funet.fi)|193.166.3.2|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/Linux/mirrors/debian ... done.
==> SIZE README ... 1495
==> PASV ... done. ==> RETR README ... done.
Length: 1495 (1.5K) (unauthoritative)
100%[================================================>] 1,495 --.-K/s in 0.01s
2015-05-02 03:29:00 (125 KB/s) - '.git/annex/tmp/URL--ftp&c%%ftp.funet.fi%pub%Linux%mirrors%debian%README' saved [1495]
ok
(recording state in git...)
================== git commit, add README ==================
[master 264d597] Add README
1 file changed, 1 insertion(+)
create mode 120000 README
================== git annex drop --force ==================
drop README ok
(recording state in git...)
================== git annex get ==================
get README (from web...)
--2015-05-02 03:29:00-- ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README
=> '.git/annex/tmp/SHA256-s1495--8822780b87a880ca9956ac108812557044618859cecb07df488df57e8134e34f'
Resolving ftp.funet.fi (ftp.funet.fi)... 193.166.3.2, 2001:708:10:9::20:2
Connecting to ftp.funet.fi (ftp.funet.fi)|193.166.3.2|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/Linux/mirrors/debian ... done.
==> SIZE README ... 1495
==> PASV ... done. ==> RETR README ... done.
Length: 1495 (1.5K) (unauthoritative)
100%[================================================>] 1,495 --.-K/s in 0s
2015-05-02 03:29:02 (73.1 MB/s) - '.git/annex/tmp/SHA256-s1495--8822780b87a880ca9956ac108812557044618859cecb07df488df57e8134e34f' saved [1495]
ok
(recording state in git...)
================== ls -l ==================
total 0
README is gone, should not happen
Reached the end
$
# End of transcript or log.
"""]]

View file

@ -0,0 +1,43 @@
When I create a new blank annex and try to sync it, I immediately run out of
space.
This is the original:
$ git annex info
repository mode: indirect
trusted repositories: 0
semitrusted repositories: 4
00000000-0000-0000-0000-000000000001 -- web
...
untrusted repositories: 0
transfers in progress: none
available local disk space: 50.51 gigabytes (+1 megabyte reserved)
local annex keys: 2581
local annex size: 135.87 gigabytes
annexed files in working tree: 4672
size of annexed files in working tree: 231.16 gigabytes
bloom filter size: 16 mebibytes (0.5% full)
backend usage:
SHA256E: 7253
Then I try to sync on the newly created annex:
$ git annex sync
commit ok
pull laptop
warning: no common commits
remote: Counting objects: 28801, done.
remote: Compressing objects: 100% (20301/20301), done.
fatal: write error: No space left on device22 MiB | 13.30 MiB/s
fatal: index-pack failed
failed
git-annex: sync: 1 failed
Now `.git` in the new annex is using 487M (this is the total size of mounted disk):
$ du -sh .git/
487M .git/
How big should the target annex be? Is it a multiple of the remote?
As far as I understand, `sync` should get only the metadata, not the file contents. How can this be bigger than the entire source annex?

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="https://www.google.com/accounts/o8/id?id=AItOawnVnsqEy82M-MuS2gLri-az83wSQ6lXSrc"
nickname="Jean"
subject="comment 1"
date="2015-05-02T08:28:56Z"
content="""
I tried reformatting the device with smaller blocksize and inode size, but this didn't help.
"""]]