get --from is the same as copy --from

get not honoring --from has surprised me a few times, so least surprise
suggests it should just behave like copy --from. This leaves the difference
between get and copy being that copy always requires the remote to copy
from, while get will decide whether to get a file from a key/value store or
a remote.
This commit is contained in:
Joey Hess 2011-06-09 18:54:49 -04:00
parent 2136534be1
commit 90dd245522
8 changed files with 17 additions and 9 deletions

View file

@ -30,7 +30,7 @@ The newline is in the wrong place and confuses the user. It should be printed _a
> A related problem occurs if an error message is unexpetedly printed.
> Dummying up an example:
>
> O get test1 (copying from foo...) E git-annex: failed to run ssh
> O get test1 (from foo...) E git-annex: failed to run ssh
> failed
>
> --[[Joey]]

View file

@ -41,7 +41,7 @@ content from the key-value store.
# sudo mount /media/usb
# git remote add usbdrive /media/usb
# git annex get video/hackity_hack_and_kaxxt.mov
get video/hackity_hack_and_kaxxt.mov (copying from usbdrive...) ok
get video/hackity_hack_and_kaxxt.mov (from usbdrive...) ok
# git commit -a -m "got a video I want to rewatch on the plane"
# git annex add iso

View file

@ -8,8 +8,8 @@ USB drive.
# cd /media/usb/annex
# git pull laptop master
# git annex get .
get my_cool_big_file (copying from laptop...) ok
get iso/debian.iso (copying from laptop...) ok
get my_cool_big_file (from laptop...) ok
get iso/debian.iso (from laptop...) ok
Notice that you had to git pull from laptop first, this lets git-annex know
what has changed in laptop, and so it knows about the files present there and

View file

@ -14,5 +14,5 @@ it:
failed
# sudo mount /media/usb
# git annex get video/hackity_hack_and_kaxxt.mov
get video/hackity_hack_and_kaxxt.mov (copying from usbdrive...) ok
get video/hackity_hack_and_kaxxt.mov (from usbdrive...) ok
# git commit -a -m "got a video I want to rewatch on the plane"

View file

@ -12,7 +12,7 @@ to clone the laptop's annex to it:
Now you can get files and they will be transferred (using `rsync` via `ssh`):
# git annex get my_cool_big_file
get my_cool_big_file (getting UUID for origin...) (copying from origin...)
get my_cool_big_file (getting UUID for origin...) (from origin...)
WORM-s2159-m1285650548--my_cool_big_file 100% 2159 2.1KB/s 00:00
ok