From 69a44f3775b4b22ef222fd22e69b97c28ce3e3f2 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Tue, 8 May 2012 16:23:45 +1200 Subject: [PATCH] Fixed _design_add_git_exclude() function to use 'git rev-parse --git-dir', which will support submodules. --- lib/design.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/design.sh b/lib/design.sh index e637a49..4d387ab 100644 --- a/lib/design.sh +++ b/lib/design.sh @@ -23,8 +23,9 @@ # Add ignore rule to .git/info/exclude if not already present _design_add_git_exclude(){ - if [ -e "$1/.git/info/exclude" ] && ! $(grep -q "$project_design_dir" "$1/.git/info/exclude"); then - echo "$project_design_dir" >> "$1/.git/info/exclude" + local git_dir="$(cd $1 && readlink -m $(git rev-parse --git-dir))" + if [ -e "$git_dir/info/exclude" ] && ! $(grep -q "$project_design_dir" "$git_dir/info/exclude"); then + echo "$project_design_dir" >> "$git_dir/info/exclude" fi }