Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
fix auto exclude in-work-tree build dirs
Browse files Browse the repository at this point in the history
updates: -- configure: add build directory to gitignore #2543 -- i3/i3#2543
  • Loading branch information
nmschulte committed Jan 10, 2017
1 parent 9cb5df4 commit 934b23f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions configure.ac
Expand Up @@ -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
Expand Down

0 comments on commit 934b23f

Please sign in to comment.