Permalink
Browse files

Fix .gitignore to allow add bin/brew without -f

  • Loading branch information...
1 parent d778aa6 commit 6333144c7b84d362007177adab2b5c9069a66d06 @adamv adamv committed Oct 25, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 .gitignore
View
@@ -2,6 +2,8 @@
!/.gitignore
!/Library/
!/README.md
+!/bin
+/bin/*
!/bin/brew
!/share/man/man1/brew.1
.DS_Store

4 comments on commit 6333144

@mxcl
Member
mxcl commented on 6333144 Aug 29, 2012

What's this about then? My confusion is first we ignore everything under bin (!/bin) then we unignore all files in bin (/bin/*) then we unignore bin/brew (!/bin/brew). I'm here for other reasons but I can't proceed before I grok this modification.

@jacknagel
Contributor

Ignoring a directory is different than ignoring files underneath it when it comes to how later negation patterns are processed.

So first we unignore bin itself, then ignore all files underneath it, then unignore /bin/brew.

If the first two steps are omitted, and only !/bin/brew appears, it will still require add -f, because the blanket /* ignores /bin, and ignored directories are not recursed into when processing patterns.

@mxcl
Member
mxcl replied Aug 29, 2012

Thanks.

@jacknagel
Contributor

NP. It's confusing as hell. Presumably the only people who really understand it are those who wrote the functionality.

Please sign in to comment.