On 24 июн, 00:26, "Federico G. Benavento" <[email protected]> wrote:
> I have a particular question, in the end are you going to be able to use
> rm, cp, etc?
>
> why not just "touch file" instead "echo add" ?
>
For what purpose do you want to use cp and rm?
Let me show some use cases for gitfs.
Suppose you mount existing git repo:
mount {gitfs repo} /mnt/git
Files are located in two directories:
- files/. This directory contains all files under repo/ directory.
In case of first solution(see above) this dir is read/write. And
all operations are done as you do them with repo/ files. For example,
if you remove files/file1 the same file under repo/ dir is removed.
In case of second solution this dir is "read-only". All data you
write to any file is interpreted as file-specific git command. You
asked why not to use just touch command. The answer is: because git
has more than one file-specific command. Of course, we could use
other commands such as chmod with cryptic semantic, but it'll confuse
you more than pointing long path to ctl file.
- objects/. This directory contains object store(blobs,tree and
commits in zlib format), which is by default located at repo/.git/
objects.
This is read/write directory. You can use any operation with this
directory. And all operations are done as you do them with the file
under repo/.git/objects.
We(Mechiel, Yiyus and me) discussed some variants of directory layout.
Summary line:
- Mechiel suggested to develop shell commands that'll be used instead
of echoed commands:
echo add dir1/dir2/file1 > ../../ctl
will be changed to
git/add file1
- Yiyus suggested to represent index file as directory. So that you
can use touch, cp, rm commands instead of git add, git rm:
echo add dir1/dir2/file1 > ../../ctl
will be changed to
cp dir1/dir2/file1 index/
As you can see there's space to roll. Feel free to comment. Comments
help me to deduce pros and cons.
Thanks,
Manzur
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Plan
9 Google Summer of Code" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/plan9-gsoc?hl=en
-~----------~----~----~----~------~----~------~--~---