Skip to content

Commit

Permalink
Added host specific config files in hosts subdirectory
Browse files Browse the repository at this point in the history
started to use this mecanism for per machine git config
  • Loading branch information
Cedric Gatay committed Jun 15, 2015
1 parent 47110fc commit 91a22b4
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 24 deletions.
26 changes: 3 additions & 23 deletions gitconfig
Expand Up @@ -17,33 +17,13 @@
# comme effacés.
climerge = mergetool -t diffmerge
tree = log --oneline --graph --decorate --all
[user]
email = cedric@gatay.fr
name = Cedric Gatay
[mergetool "diffmerge"]
cmd = diffmerge --merge\n--result=$MERGED $LOCAL $BASE $REMOTE
trustExitCode = true
[merge]
tool = diffmerge
[mergetool]
keepBackup = false
[core]
excludesfile = /Users/cgatay/.gitignore_global
autocrlf = input
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[credential]
helper = osxkeychain
trustctime = false
[push]
default = current
[achievement]
upload = true
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[pull]
rebase = true
[include]
path = .host/gitconfig
3 changes: 3 additions & 0 deletions hosts/L83075/gitconfig
@@ -0,0 +1,3 @@
[user]
name = Cedric Gatay
email = cedric.gatay.external@worldline.com
27 changes: 27 additions & 0 deletions hosts/cgatay1.local/gitconfig
@@ -0,0 +1,27 @@
[user]
email = cedric@gatay.fr
name = Cedric Gatay


[mergetool "diffmerge"]
cmd = diffmerge --merge\n--result=$MERGED $LOCAL $BASE $REMOTE
trustExitCode = true
[merge]
tool = diffmerge
[mergetool]
keepBackup = false

[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[credential]
helper = osxkeychain

[achievement]
upload = true
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
6 changes: 5 additions & 1 deletion install.sh
@@ -1,9 +1,10 @@
#!/usr/bin/env /bin/sh
HOST=`hostname -s`
DEST_DIR=$HOME
OVERWRITE_ALL=false
for file in `ls -1`; do
current_name=.`basename $file`;
if [ $current_name = ".README.rdoc" -o $current_name = ".install.sh" ]; then
if [ $current_name = ".README.rdoc" -o $current_name = ".install.sh" -o $current_name = ".hosts" ]; then
continue
fi;
should_link=true
Expand Down Expand Up @@ -31,4 +32,7 @@ for file in `ls -1`; do
echo "Linking $current_name"
fi
done;
if [ -d hosts/$HOST ]; then
ln -s -r -f hosts/$HOST $DEST_DIR/.host
fi
mkdir -p ~/.vim/backups ~/.vim/swaps ~/.vim/undo

0 comments on commit 91a22b4

Please sign in to comment.