>> Hi all,
>> 
>> just for your information, i have develop a script to store big binaries in 
>> git repository.
>> With this we can have a full filesystem with all the versions like this:
>> 
>> 4.1
>> ├── 4.1/i386
>> │   └── 4.1/i386/pkg2.lrp
>> └── 4.1/x86_64
>>     ├── 4.1/x86_64/pkg1.lrp
>>     └── 4.1/x86_64/pkg3.lrp
>> 5.1.2
>> ├── 5.1.2/i386
>> └── 5.1.2/x86_64
>>     └── 5.1.2/x86_64/pkg5.lrp
>> 5.1.3
>> ├── 5.1.3/i386
>> │   ├── 5.1.3/i386/pkg2.lrp
>> │   └── 5.1.3/i386/pkg5.lrp
>> └── 5.1.3/x86_64
>>     └── 5.1.3/x86_64/pkg6.lrp
>> 
>> With just one command we can create the full filesystem locally (git clone 
>> xxxxx) but all the files are only symlinks. So the download is really fast 
>> and don't require space.
>> After that you can download the file you need by just on command.
>> As the system use git, if a package is use in different places only one copy 
>> are store in the repository.
> 
> How would you fetch from such a repository?
> 
>> 
>> The repository of my script: https://github.com/JrCs/git-store
> 
> A bit complex without comments, what can we achieve with this?

An example using a local repository (it’s the same for a remote repository)

# Create the repository
cd /tmp
git init --bare myrepo.git
git clone /tmp/myrepo.git mycheckout

# Clone the repository and commit a text file and a binary
cd mycheckout
echo "Nothing" > Readme.txt
git add Readme.txt

mkdir -p 5.1.3/x86_64
dd if=/dev/urandom of=5.1.3/x86_64/pkg1.lrp bs=1024 count=1024
git store add 5.1.3/x86_64/pkg1.lrp
git store push

git commit -a -m "First release"
git push

# Checkout the repository in another directory
cd /tmp
git clone /tmp/myrepo.git mycheckout2
cd mycheckout2
git store get 5.1.3/x86_64/pkg1.lrp

Regards,
Yves
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/

_______________________________________________
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to