aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/addurl_--file__causes_file_redownload_even_if_it_already_present.mdwn
blob: c3645b6fa6a8de04871137451efcfb1dd9d7db29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
### Please describe the problem.

IMHO annex shouldn't redownload the file (not yet under annex/git control) entirely if pointed by --file=FILE FILE exists.  

[[!format sh """

$> chmod a+w -R /tmp/123; rm -rf /tmp/123; mkdir /tmp/123; cd /tmp/123; git init; git annex init;                                            
Initialized empty Git repository in /tmp/123/.git/                                               
init  ok

$> wget -q http://www.onerussian.com/tmp/banner.png                                  

$> ls -l 
total 28
-rw------- 1 yoh yoh 25319 Sep 17 13:49 banner.png

$> git annex addurl --file=banner.png http://www.onerussian.com/tmp/banner.png
addurl banner.png (downloading http://www.onerussian.com/tmp/banner.png ...) 
/tmp/123/.git/annex/tmp/URL-s25319--http&c%%w 100%[=================================================================================================>]  24.73K  --.-KB/s    in 0.003s  
ok

$> git annex version
git-annex version: 6.20160104+gitg0cf96be-1~ndall+1

"""]

[[!meta author=yoh]]

> I don't think that the re-download is the bug. The actual problem
> is that the file is present and not an annexed file, so git-annex addurl
> should avoid overwriting it, whatever its content. [[fixed|done]]
> --[[Joey]]