git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [RFC PATCH v2 4/4] read-tree: add --no-sparse to turn off sparse  hook
Date: Tue, 11 Aug 2009 14:08:59 +0700	[thread overview]
Message-ID: <fcaeb9bf0908110008g1cbd3442p180557cbe6f24bb1@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0908110846050.4638@intel-tinevez-2-302>

On Tue, Aug 11, 2009 at 1:50 PM, Johannes
Schindelin<Johannes.Schindelin@gmx.de> wrote:
>> Why not making the hook to be skipped by default, and pass an explicit
>> option to trigger the hook?
>>
>> I like Dscho's other suggestion to use patterns like .gitignore instead
>> of using hook scripts that needs to be ported across platforms, by the
>> way.
>
> I forgot to mention that I checked dir.c to verify that
> add_excludes_from_file_1() (which is static, so you'll either need to use
> it in the same file, or even better, export it renaming it to something
> like add_excludes_from_file_to_list()) and excluded_1() (same here)
> already do a large part of what you need.

Indeed (and I have that code too). I still like the hook though
because you have more freedom in defining your worktree (and yes, less
portable). I wanted to make something generic enough that you can
build higher "strategies" on top, like .gitignore-based patterns.
Anyway I'll send out another patch for .gitignore patterns tonight and
see how it goes.
-- 
Duy

  reply	other threads:[~2009-08-11 21:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-10 15:19 [RFC PATCH v2 0/4] Sparse checkout Nguyễn Thái Ngọc Duy
2009-08-10 15:19 ` [RFC PATCH v2 1/4] Prevent diff machinery from examining assume-unchanged entries on worktree Nguyễn Thái Ngọc Duy
2009-08-10 15:19   ` [RFC PATCH v2 2/4] gitignore: read from index if .gitignore is assume-unchanged Nguyễn Thái Ngọc Duy
2009-08-10 15:19     ` [RFC PATCH v2 3/4] unpack_trees(): add support for sparse checkout Nguyễn Thái Ngọc Duy
2009-08-10 15:19       ` [RFC PATCH v2 4/4] read-tree: add --no-sparse to turn off sparse hook Nguyễn Thái Ngọc Duy
2009-08-10 16:46         ` Johannes Schindelin
2009-08-11  1:38           ` Nguyen Thai Ngoc Duy
2009-08-11  5:13             ` Junio C Hamano
2009-08-11  6:50               ` Johannes Schindelin
2009-08-11  7:08                 ` Nguyen Thai Ngoc Duy [this message]
2009-08-10 16:41       ` [RFC PATCH v2 3/4] unpack_trees(): add support for sparse checkout Johannes Schindelin
2009-08-11  1:47         ` Nguyen Thai Ngoc Duy
2009-08-11  7:02           ` Johannes Schindelin
2009-08-10 16:33     ` [RFC PATCH v2 2/4] gitignore: read from index if .gitignore is assume-unchanged Johannes Schindelin
2009-08-11  1:57       ` Nguyen Thai Ngoc Duy
2009-08-11  8:12         ` Johannes Schindelin
2009-08-10 16:20   ` [RFC PATCH v2 1/4] Prevent diff machinery from examining assume-unchanged entries on worktree Johannes Schindelin
2009-08-11  1:34     ` Nguyen Thai Ngoc Duy
2009-08-11  6:45       ` Johannes Schindelin

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

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

  git send-email \
    --in-reply-to=fcaeb9bf0908110008g1cbd3442p180557cbe6f24bb1@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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 NNTP newsgroup(s).