]> git.sur5r.net Git - i3/i3/commitdiff
fix auto exclude in-work-tree build dirs 2628/head
authorNathan Schulte <nmschulte@gmail.com>
Tue, 10 Jan 2017 00:43:38 +0000 (18:43 -0600)
committerNathan Schulte <nmschulte@gmail.com>
Tue, 10 Jan 2017 01:42:52 +0000 (19:42 -0600)
updates: -- configure: add build directory to gitignore #2543 -- https://github.com/i3/i3/pull/2543

configure.ac

index 9d4b2f40f5cecf1cce740055e793ad9d74c8f282..4f67d5ea867775734381d84af816ed8d7a5c362d 100644 (file)
@@ -154,8 +154,9 @@ else
        print_BUILD_MANS=no
 fi
 
-git_dir=`git rev-parse --git-dir 2>/dev/null`
-if test -n "$git_dir"; then
+in_git_worktree=`git rev-parse --is-inside-work-tree 2>/dev/null`
+if "$in_git_worktree" == "true"; then
+       git_dir=`git rev-parse --git-dir 2>/dev/null`
        srcdir=`dirname "$git_dir"`
        exclude_dir=`pwd | sed "s,^$srcdir,,g"`
        if ! grep -q "^$exclude_dir" "$git_dir/info/exclude"; then