All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 # This adds a special type of git repository, where the .git directory
2 # is stored on a file server, to avoid wasting space with it on the client.
3 # One example use is storing a music collection in git, where you can spare
4 # the extra space needed for .git on your file server, but not on your
5 # laptop. This fills basically the same niche as unison.
7 # To make mr use this file, add a line like this inside the [DEFAULT]
8 # section of your ~/.mrconfig
9 #include = cat /usr/share/mr/gitless
11 # And an example repo using it would look something like:
13 #checkout = gitless_checkout turtle /media/turtle/home/joey/lib sound
15 # In this example, the file server's hostname is "turtle",
16 # and it's mounted on /media/turtle. The file server contains a sound.git
17 # repository in the specified directory under that mount point.
18 # When mr checks out that repository, it will create a sound.hostname
19 # directory on the server, containing just the .git directory, and symlink
20 # the client's .git directory to it. After checkout, normal git and mr
21 # commands can be used, as long as the file server is available.
28 hostname="$(hostname)"
29 if [ "$hostname" = "$server" ]; then
30 git clone "$dir.git" "$dir"
33 if [ ! -d "$remotebase/$dir.$hostname" ]; then
34 git clone --shared --no-checkout "$remotebase/$dir.git" "$remotebase/$dir.$hostname"
38 ln -sf "$remotebase/$dir.$hostname/.git"
42 # disable auto gc, because it breaks repo hard links,
43 # and is not smart to run over a networked filesystem