Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update docs for multiple machines and known bugs

  • Loading branch information...
commit 4fa77cda38c3a61af5e1bf9ead0a63c6824fd6ce 1 parent 119101b
Jay Levitt jaylevitt authored

Showing 3 changed files with 89 additions and 5 deletions. Show diff stats Hide diff stats

  1. +2 0  ChangeLog
  2. +87 2 README.txt
  3. +0 3  folddir.ml
2  ChangeLog
@@ -3,6 +3,8 @@
3 3
4 4 * Store/restore mtime by default, and stop being verbose
5 5
  6 + * Update docs for multiple machines and known bugs
  7 +
6 8 2008-11-29 19:00 Jay Levitt <jay@jay.fm>
7 9 * Log and continue after errors setting utime
8 10
89 README.txt
@@ -23,10 +23,18 @@ gibak needs the following software at run-time:
23 23 * common un*x userland: bash, basename, pwd, hostname, cut, grep,
24 24 egrep, date...
25 25
  26 +It needs the following software to compile:
  27 +* ocaml (tested with version 3.10.1 and 3.10.2)
  28 +* omake
  29 +* ocaml-fileutils
  30 +* Findlib
  31 +
  32 +To install dependencies on Mac:
  33 +* sudo port install git-core rsync caml-findlib omake
  34 +* There is no port for ocaml-fileutils; you'll have to build it from source at http://le-gall.net/sylvain+violaine/download/ocaml-fileutils-latest.tar.gz
  35 +
26 36 Installation
27 37 ============
28   -You'll need OCaml and omake to compile gibak (it has been tested with OCaml
29   -3.10.1).
30 38
31 39 (1) Verify the compilation parameters in OMakefile. The defaults should work
32 40 in most cases, but you might need to change a couple variables:
@@ -81,6 +89,83 @@ against disk crashes. You can also clone the repository (probably using a bare
81 89 repository --- without working tree --- for smaller space usage) and rsync
82 90 .git/git-repositories to remote machines for further protection.
83 91
  92 +Multiple machines
  93 +-----------------
  94 +You can clone your home directory on another machine, but it's a little
  95 +tricky: git won't let you clone into an existing directory. Also, git won't
  96 +copy the links in .git/hooks, which we use to update the metadata on each
  97 +checkout. Be sure that your UID and GUID are the same on both machines!
  98 +
  99 +So, to clone from your desktop to your laptop, do this on the laptop:
  100 +
  101 +1. Copy over gibak and ometastore to a directory in your path
  102 +/Users/bob$ sudo -s
  103 +/Users/bob# cd /usr/local/bin
  104 +/usr/local/bin# scp desktop:/usr/local/bin/gibak .
  105 +/usr/local/bin# scp desktop:/usr/local/bin/ometastore .
  106 +
  107 +1. Do the initial clone
  108 +
  109 +/usr/local/bin# cd ~bob
  110 +/Users/bob# cd ..
  111 +/Users# mkdir bob-temp
  112 +/Users# git clone desktop:.git bob-temp
  113 +/Users# ls bob-temp
  114 +Documents/
  115 +Library/
  116 +...etc...
  117 +/Users# mv bob-temp/* /Users/bob
  118 +
  119 +This will fail to move any directories that already exist in your
  120 +home directory. I'm sure there's a nice, safe way around that, so someone
  121 +should update these docs with that magic solution.
  122 +
  123 +2. Link the hooks and update your metadata:
  124 +
  125 +/Users# cd bob
  126 +/Users/bob# ln -s .git-hooks/* .git/hooks
  127 +/Users/bob# .git/hooks/post-checkout
  128 +...any errors will be displayed...
  129 +
  130 +3. Recommit
  131 +/Users/bob# exit
  132 +/Users/bob$ gibak commit
  133 +
  134 +4. Push back to the desktop
  135 +
  136 +[THIS needs some serious documentation. "git push" is NOT the way to go;
  137 +you can't push into a repository with an active working copy! That will
  138 +leave desktop in a state where it incorrectly thinks it's out of date.
  139 +
  140 +I haven't figured this part out yet, but clues are at:
  141 +
  142 +http://hans.fugal.net/blog/2008/11/10/git-push-is-worse-than-worthless
  143 +
  144 +and
  145 +
  146 +http://git.or.cz/gitwiki/GitFaq#head-b96f48bc9c925074be9f95c0fce69bcece5f6e73
  147 +
  148 +...]
  149 +
  150 +5. Periodic synchronization
  151 +
  152 +When you want to sync the laptop, just:
  153 +
  154 +/Users/bob$ git pull
  155 +...
  156 +/Users/bob$ git that-magic-alternative-to-push-someone-wrote-about-in-step-4
  157 +
  158 +Known Bugs
  159 +==========
  160 +
  161 +* .gitignore patterns ending in "/" should match directories, but not files, per "man gitignore".
  162 + We fail to match them at all! Workaround: be sure that none of your directory patterns will
  163 + accidentally match a file, and then just remove the trailing slashes.
  164 +
  165 +* ometastore gets confused trying to do chown and utime on symlinks. It spits a harmless error
  166 + out, but this should be cleaned up.
  167 +
  168 +
84 169 License
85 170 =======
86 171 The gibak script is free software: you can redistribute it and/or modify it
3  folddir.ml
@@ -72,9 +72,6 @@ module Gitignore : IGNORE =
72 72 struct
73 73 open Printf
74 74
75   - (* BUG: Patterns ending in "/" should match directories, but not files, per "man gitignore". We fail to
76   - * match them at all! Leaving bug here for someone who knows OCaml to fix. *)
77   -
78 75 type glob_type = Accept | Deny
79 76 (* Simple: no wildcards, no slash
80 77 * Simple_local: leading slash, otherwise no slashes, no wildcards

0 comments on commit 4fa77cd

Please sign in to comment.
Something went wrong with that request. Please try again.