All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [RFC PATCH v3 8/8] --sparse for porcelains
Date: Fri, 14 Aug 2009 22:23:06 +0200	[thread overview]
Message-ID: <200908142223.07994.jnareb@gmail.com> (raw)
In-Reply-To: <fcaeb9bf0908130538x396b1208s43d312107e3e198c@mail.gmail.com>

Dnia czwartek 13. sierpnia 2009 14:38, Nguyen Thai Ngoc Duy napisał:
> On 8/13/09, Jakub Narebski <jnareb@gmail.com> wrote:
>> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
>>> 2009/8/12 Junio C Hamano <gitster@pobox.com>:
>>
>>>> It could also require core.sparseworktree configuration set to true if we
>>>> are really paranoid, but without the actual sparse specification file
>>>> flipping that configuration to true would not be useful anyway, so in
>>>> practice, giving --sparse-work-tree option to these Porcelain commands
>>>> would be no-op, but --no-sparse-work-tree option would be useful to
>>>> ignore $GIT_DIR/info/sparse and populate the work tree fully.
>>>
>>> Only part "ignore $GIT_DIR/info/sparse" is correct.
>>> "--no-sparse-work-tree" would not clear CE_VALID from all entries in
>>> index (which is good, if you are using CE_VALID for another purpose).
>>>
>>> To quit sparse checkout, you must create an empty
>>> $GIT_DIR/info/sparse, then do "git checkout" or "git read-tree -m -u
>>> HEAD" so that the tree is full populated, then you can remove
>>> $GIT_DIR/info/sparse. Quite unintuitive..
>>
>>
>> Hmmm... this looks like either argument for introducing --full option
>>  to git-checkout (ignore CE_VALID bit, checkout everything, and clean
>>  CE_VALID (?))...
>>
>>  ...or for going with _separate_ bit for partial checkout, like in the
>>  very first version of this series, which otherwise functions like
>>  CE_VALID, or is just used to mark that CE_VALID was set using sparse.
> 
> In my opinion, making an empty .git/info/sparse to fully populate
> worktree is not too bad. I wanted to have plumbing-level support in
> git so that you could try sparse checkout on your projects (possibly
> with a few additional scripts to make your life easier). Then good
> Porcelain UI may emerge later (or in worst case, people would roll
> their own sparse checkout).

Deciding whether sparse checkout should use CE_VALID only, or should it
(as it was in the very first version of series) use additional flag, 
either CE_NO_CHECKOUT, or CE_VALID_IS_USED_HERE_FOR_SPARSE_CHECKOUT ;-)
is a design decision about *plumbing-level* support.

Note that shallow clone, while using the same mechanism as grafts file,
nevertheless use separate file; so perhaps sparse checkout while using
the same mechanism as --assume-unchanged should use additional flag.


BTW. you might want to use GIT_SPARSE_FILE, similar to GIT_INDEX_FILE;
see the fact that plumbing doesn't have .gitignore not .git/info/excludes
hardcoded... well, except for --standard-excludes.  This way full
checkout would be as simple as using

  $ GIT_SPARSE_FILE= git checkout -- .

-- 
Jakub Narebski
Poland

  reply	other threads:[~2009-08-14 20:23 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 15:43 [RFC PATCH v3 0/8] Sparse checkout Nguyễn Thái Ngọc Duy
2009-08-11 15:43 ` [RFC PATCH v3 1/8] Prevent diff machinery from examining assume-unchanged entries on worktree Nguyễn Thái Ngọc Duy
2009-08-11 15:44   ` [RFC PATCH v3 2/8] Avoid writing to buffer in add_excludes_from_file_1() Nguyễn Thái Ngọc Duy
2009-08-11 15:44     ` [RFC PATCH v3 3/8] Read .gitignore from index if it is assume-unchanged Nguyễn Thái Ngọc Duy
2009-08-11 15:44       ` [RFC PATCH v3 4/8] excluded_1(): support exclude "directories" in index Nguyễn Thái Ngọc Duy
2009-08-11 15:44         ` [RFC PATCH v3 5/8] dir.c: export excluded_1() and add_excludes_from_file_1() Nguyễn Thái Ngọc Duy
2009-08-11 15:44           ` [RFC PATCH v3 6/8] unpack-trees.c: generalize verify_* functions Nguyễn Thái Ngọc Duy
2009-08-11 15:44             ` [RFC PATCH v3 7/8] Support sparse checkout in unpack_trees() and read-tree Nguyễn Thái Ngọc Duy
2009-08-11 15:44               ` [RFC PATCH v3 8/8] --sparse for porcelains Nguyễn Thái Ngọc Duy
2009-08-12  6:33                 ` Junio C Hamano
2009-08-12 10:01                   ` Nguyen Thai Ngoc Duy
2009-08-13  7:20                   ` Nguyen Thai Ngoc Duy
2009-08-13  9:58                     ` Jakub Narebski
2009-08-13 12:38                       ` Nguyen Thai Ngoc Duy
2009-08-14 20:23                         ` Jakub Narebski [this message]
2009-08-15  2:01                           ` Junio C Hamano
2009-08-15 23:37                             ` Jakub Narebski
2009-08-16  8:14                               ` Johannes Schindelin
2009-08-17  9:08                                 ` Johannes Schindelin
2009-08-17 12:49                                   ` Nguyen Thai Ngoc Duy
2009-08-17 13:35                                     ` Johannes Schindelin
2009-08-17 14:41                                       ` Nguyen Thai Ngoc Duy
2009-08-17 15:19                                         ` Johannes Schindelin
2009-08-17 16:13                                           ` Nguyen Thai Ngoc Duy
2009-08-17 15:41                                   ` Junio C Hamano
2009-08-17 16:06                                     ` Nguyen Thai Ngoc Duy
2009-08-17 16:19                                     ` Johannes Schindelin
2009-08-17 18:39                                       ` Junio C Hamano
2009-08-17 22:02                                         ` Johannes Schindelin
2009-08-17 23:02                                           ` skillzero
2009-08-17 23:16                                             ` Johannes Schindelin
2009-08-18  0:17                                               ` Jakub Narebski
2009-08-18  0:34                                                 ` skillzero
2009-08-18  1:43                                                   ` Nguyen Thai Ngoc Duy
2009-08-18  6:25                                                     ` git find (was: [RFC PATCH v3 8/8] --sparse for porcelains) Jakub Narebski
2009-08-18 14:35                                                       ` Nguyen Thai Ngoc Duy
2009-08-18 16:00                                                         ` Jakub Narebski
2009-08-18  0:49                                                 ` [RFC PATCH v3 8/8] --sparse for porcelains Jakub Narebski
2009-08-18  0:23                                               ` skillzero
2009-08-17 16:46                                     ` Junio C Hamano
2009-08-17 21:45                                       ` Johannes Schindelin
2009-08-17 16:01                                 ` Jakub Narebski
2009-08-12  7:31                 ` Johannes Sixt
2009-08-12  9:53                   ` Nguyen Thai Ngoc Duy
2009-08-12 15:40                     ` Raja R Harinath
2009-08-13  7:37                       ` Johannes Sixt
2009-08-11 21:18               ` [RFC PATCH v3 7/8] Support sparse checkout in unpack_trees() and read-tree skillzero
2009-08-11 21:38                 ` Jakub Narebski
2009-08-11 22:03                   ` skillzero
2009-08-12  1:30                     ` Nguyen Thai Ngoc Duy
2009-08-12  4:59                       ` skillzero
2009-08-12  2:51       ` [RFC PATCH v3 3/8] Read .gitignore from index if it is assume-unchanged Junio C Hamano
2009-08-13  6:37         ` Nguyen Thai Ngoc Duy

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=200908142223.07994.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.