chiark / gitweb /
New substitute machinery
[ian-dotfiles.git] / templates / gitconfig.in
diff --git a/templates/gitconfig.in b/templates/gitconfig.in
new file mode 100755 (executable)
index 0000000..7e874d2
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/bash
+set -e
+. infra/template
+
+case "$(hostname -f)" in
+*.xensource.com)
+    email="ian.jackson@eu.citrix.com"
+    cache=git://git-cache.xs.citrite.net:9419
+    ;;
+*)
+    email=ijackson@chiark.greenend.org.uk
+    ;;
+esac
+
+cat <<END
+[user]
+       email="$email"
+[sendemail]
+        bcc = $email
+END
+
+if [ "$cache" ]; then
+    cat <<END
+[url "$cache/git://"]
+        insteadOf = git://
+[url "$cache/git://"]
+        insteadOf = $cache/git://
+[color]
+        diff = false
+        ui = false
+END
+fi