From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH v2 3/4] unpack_trees(): add support for sparse checkout
Date: Tue, 11 Aug 2009 08:47:53 +0700 [thread overview]
Message-ID: <fcaeb9bf0908101847w7b3b22d9w84514a29ceae719e@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0908101837510.8324@intel-tinevez-2-302>
2009/8/10 Johannes Schindelin <Johannes.Schindelin@gmx.de>:
> Hi,
>
> On Mon, 10 Aug 2009, Nguyễn Thái Ngọc Duy wrote:
>
>> This patch teaches unpack_trees() to checkout/remove entries on working
>> directories appropriately when sparse checkout area is changed. Hook
>> "sparse" is needed to help determine which entry will be checked out,
>> which will not be.
>>
>> When the hook is run, it is prepared with a pseudo index. The hook then
>> can use "git update-index --[no-]assume-unchanged" to manipulate the
>> index. It should not do anything else on the index. Assume unchanged
>> information from the index will be used to shape working directory.
>
> If I understand correctly, the purpose of the hook is to allow the user to
> mark something as unwanted preemptively, right?
>
> If that is the sole reason for the hook, would it not be better to add
> support for a file .git/info/sparse which has the same syntax as
> .git/info/exclude, and which is used to determine if an
> added/modified/deleted file is supposed to be in the "sparse" area or not?
>
> Something like
>
> *
> !/Documentation/
>
> comes to mind.
That was what the original series was about (although I used git
config instead of .git/info/sparse). The hook has two advantages:
- flexibility: you can set things differently based on branch, for
example, or filter files based on certain file content.
- less code bloat (and less intrusive too), compare ~1000 lines of
change of the original series with this series.
--
Duy
next prev parent reply other threads:[~2009-08-11 1:48 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
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 [this message]
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=fcaeb9bf0908101847w7b3b22d9w84514a29ceae719e@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/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).