{"thread":{"id":"34011","subject":"Is there an API to the .gitignore capability?","startedAt":"2013-06-02T14:40:03Z","lastAt":"2013-06-03T23:04:19Z","messageCount":2,"participants":["Peng Yu","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"219167","messageId":"CABrM6wnJYSGGsj=ZxHOFRMmDCSgsU0dFwxus=h1PtVazgpg3ug@mail.gmail.com","threadId":"34011","inReplyTo":null,"subject":"Is there an API to the .gitignore capability?","fromName":"Peng Yu","fromEmail":"pengyu.ut@gmail.com","sentAt":"2013-06-02T14:40:03Z","receivedAt":"2013-06-02T14:40:03Z","isPatch":false,"sender":{"key":"pengyu.ut@gmail.com","avatar":null},"body":"Hi,\n\n.gitignore is a flexible way to customize what dir/file to search or\nnot to search. So it is of general use and is more flexible than what\nis offered by \"find\". I'm wondering if there is an API than I can use\nbesides using it within git. Thanks.\n\n-- \nRegards,\nPeng\n"},{"id":"219313","messageId":"CACsJy8DzcZ6PxBkGyYDobTZmY6sKF0ANhXnkz9xnULPG5USiNg@mail.gmail.com","threadId":"34011","inReplyTo":"CABrM6wnJYSGGsj=ZxHOFRMmDCSgsU0dFwxus=h1PtVazgpg3ug@mail.gmail.com","subject":"Re: Is there an API to the .gitignore capability?","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2013-06-03T23:04:19Z","receivedAt":"2013-06-03T23:04:19Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sun, Jun 2, 2013 at 9:40 PM, Peng Yu <pengyu.ut@gmail.com> wrote:\n> Hi,\n>\n> .gitignore is a flexible way to customize what dir/file to search or\n> not to search. So it is of general use and is more flexible than what\n> is offered by \"find\". I'm wondering if there is an API than I can use\n> besides using it within git. Thanks.\n\nGit provides no C API, if that's what you mean. You can link with\nlibgit.a, but there's no guarantee it won't break someday. At a higher\n\"API\" level such as shell scripting, still \"no\", but I think you could\nmodify \"git ls-files\" to support running 'ls-files -i' without a git\nrepository (like git-grep --no-index). I think it'll work, mostly, but\nnot entirely sure.\n--\nDuy\n"}]}