chiark / gitweb /
211e36cc19c690a5074f4ba8e8eb21f0703fe40a
[ian-dotfiles.git] / templates / gitconfig.in
1 #!/bin/bash
2 set -e
3 . infra/template
4
5 case "$(hostname -f)" in
6 *.xensource.com)
7     email="ian.jackson@eu.citrix.com"
8     cache=git://git-cache.xs.citrite.net:9419
9     othercache=drall:9419
10     ;;
11 *)
12     cache=git://localhost:9419
13     email=ijackson@chiark.greenend.org.uk
14     ;;
15 esac
16
17 cat <<END
18 [user]
19         name = Ian Jackson
20         email = $email
21 [sendemail]
22         bcc = $email
23 END
24
25 case "$(hostname)" in
26 zealot)
27     cat <<END
28         smtpdomain = zealot.relativity.greenend.org.uk
29         smtpserver = tunnel.chiark.greenend.org.uk
30         smtpserverport = 25
31         envelopesender = $email
32         bcc = $email
33 [dgit-distro "debian"]
34         username = iwj
35         keyid = 0x48B50D39
36 [gui]
37         fontui = -family \"DejaVu Sans\" -size 11 -weight normal -slant roman -underline 0 -overstrike 0
38         fontdiff = -family \"DejaVu Sans Mono\" -size 11 -weight normal -slant roman -underline 0 -overstrike 0
39 [url "git://git.kernel.org/"]
40         insteadOf = git://git.kernel.org/
41 [url "git://xenbits.xen.org/linux-pvops.git"]
42         insteadOf = git://xenbits.xen.org/linux-pvops.git
43 END
44     ;;
45 esac
46
47 if [ "$cache" ]; then
48     cat <<END
49 [url "$cache/git://"]
50         insteadOf = git://
51 [url "$cache/"]
52         insteadOf = $cache/
53 END
54
55    if [ "$othercache" ]; then
56        cat <<END
57 [url "git://$othercache/http://"]
58         insteadOf = git://$othercache/http://
59 [url "git://$othercache/https://"]
60         insteadOf = git://$othercache/https://
61 [url "git://$othercache/git://"]
62         insteadOf = git://$othercache/git://
63 END
64     fi
65
66 fi
67
68 cat <<END
69 [color]
70         diff = false
71         ui = false
72 [merge]
73         conflictStyle = diff3
74 [branch]
75         autoSetupMerge = false
76 [dgit "default"]
77         clean-mode = git
78         build-products-dir = ../bpd
79 END