git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Peng Yu <pengyu.ut@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Is there an API to the .gitignore capability?
Date: Tue, 4 Jun 2013 06:04:19 +0700	[thread overview]
Message-ID: <CACsJy8DzcZ6PxBkGyYDobTZmY6sKF0ANhXnkz9xnULPG5USiNg@mail.gmail.com> (raw)
In-Reply-To: <CABrM6wnJYSGGsj=ZxHOFRMmDCSgsU0dFwxus=h1PtVazgpg3ug@mail.gmail.com>

On Sun, Jun 2, 2013 at 9:40 PM, Peng Yu <pengyu.ut@gmail.com> wrote:
> Hi,
>
> .gitignore is a flexible way to customize what dir/file to search or
> not to search. So it is of general use and is more flexible than what
> is offered by "find". I'm wondering if there is an API than I can use
> besides using it within git. Thanks.

Git provides no C API, if that's what you mean. You can link with
libgit.a, but there's no guarantee it won't break someday. At a higher
"API" level such as shell scripting, still "no", but I think you could
modify "git ls-files" to support running 'ls-files -i' without a git
repository (like git-grep --no-index). I think it'll work, mostly, but
not entirely sure.
--
Duy

      reply	other threads:[~2013-06-03 23:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-02 14:40 Is there an API to the .gitignore capability? Peng Yu
2013-06-03 23:04 ` Duy Nguyen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACsJy8DzcZ6PxBkGyYDobTZmY6sKF0ANhXnkz9xnULPG5USiNg@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pengyu.ut@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).