From aa084d9b7b939e5e8cfc10513c957460a18cc3a1 Mon Sep 17 00:00:00 2001 From: TweeKane Date: Wed, 23 Mar 2011 12:49:52 +0300 Subject: [PATCH] Add global gitignore to git-ignore output --- bin/git-ignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/git-ignore b/bin/git-ignore index e0c1474..bbbf216 100755 --- a/bin/git-ignore +++ b/bin/git-ignore @@ -2,9 +2,14 @@ if test $# -eq 0; then test -f .gitignore && cat .gitignore + if test -f `git config --global core.excludesfile`; then + echo -e "\n# Global gitignore:\n" + cat `git config --global core.excludesfile` + fi else for pattern in $@; do echo "... adding '$pattern' to .gitignore" (test -f .gitignore && grep -q $pattern .gitignore) || echo $pattern >> .gitignore done fi +