-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
50 lines (40 loc) · 2.33 KB
/
README
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
An Example Git Remote Helper
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This project is an example Git remote helper implementing the ‘push’ and
‘fetch’ capabilities and thus providing full bidirectional synchronisation
between a local repository and a remote server. For the purpose of clarity,
a local directory is used as the remote storage so it is easier to debug and
understand how the process works.
Performance and Limitations
---------------------------
This script is a result of my own studying the subject. The purpose of this
helper is merely to demonstrate how synchronisation between a local repository
and a remote server works. It really does not make any sense to use it as
a stable tool to share your repositories with others as it may possibly lack
some edge features and, therefore, break integrity of the transferred data.
The program has some performance-related limitations. As already mentioned,
it uses a local directory as the ‘remote’ storage and transfers the objects
one by one. However, this approach would be an overkill when transferring data
over the Internet. In that case, it would be a good idea to utilise Git
Packfiles to pack and transfer the data (if the parameters of the remote
storage allow such an approach).
Documentation
-------------
As a basic introduction to the idea of Git remote helpers, the official
documentation [https://git-scm.com/docs/git-remote-helpers] can be useful.
However, the documentation concerns only the details of the interface
for communication between the helper and Git itself but it does not give
a detailed explanation of the synchronisation processes. Therefore, it
is required to gain a deeper understanding of the format of the Git object
database and of Git objects themselves.
Technical details of the synchronisation process are documented inside
the script.
Licensing Notice
----------------
This software is released under the terms of the GPL license version 2 as
published by the Free Software Foundation. You can freely redistribute and/or
modify the software under the terms of the license.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
For more information on details of the license, see the file COPYING.