git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH 0/9] Narrow/Sparse checkout round 3: "easy mode"
Date: Sun, 17 Aug 2008 20:36:28 +0700	[thread overview]
Message-ID: <fcaeb9bf0808170636j3c273ef9sfa55c8e432ab1293@mail.gmail.com> (raw)
In-Reply-To: <7v3al49nos.fsf@gitster.siamese.dyndns.org>

On 8/17/08, Junio C Hamano <gitster@pobox.com> wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
>  > "Nguyen Thai Ngoc Duy" <pclouds@gmail.com> writes:
>
> > ...
>
> >> The problem is "narrow rules" may change over time in a way that git
>  >> may handle it wrong. Assume that you have a directory with two files:
>  >> a and b. You first narrow checkout a (which would save the rule
>  >> "checkout a"). Then you do "git checkout b". When you update HEAD,
>  >> what should happen?
>  >
>  > I'd expect that this sequence:
>
> > ...
>
> > you can record list of pathspecs (with positive and negative) to implement
>  > that semantics, no?
>
> By the way, I was just mentioning the index extension area as a means to
>  store the rules if _you wanted to_.  I do not insist you to actually store
>  the rules, and in fact, I do not know if it is even a good idea to do so.

I was more worried about those rules getting out of control because
git-checkout is not the only command that can change narrow rules.
After enough commands, the rules can become a mess that you don't even
want to look at them. I don't do negative rules now, but yes that's
possible.

>  > Ok.  We would need to use an extra bit for this.
>  >
>  > The bit 0x4000 is the last one available, so we would want to use it as
>  > "this index entry uses more bits than the traditional format" bit, and
>  > define a backward incompatible on-disk index entry format to actually
>  > record CE_NO_CHECKOUT and other flags we will invent in the future.
>  >
>  > Perhaps ondisk_cache_entry structure will have an extra "unsigned int
>  > flags2" after "flags" when that bit is on, and we can have 31 more bits in
>  > flags2, with the highest bit of flags2 signalling the presense of flags3
>  > word in the future, or something like that.
>
>
> It might make sense to do this first as a futureproof, if we really want
>  to go this route.  We can ensure that an index that does use the new flag
>  bits won't be misinterpreted by older git.

The patch is fine. Still we need to do something to prevent older git
from using new index format.
-- 
Duy

  parent reply	other threads:[~2008-08-17 13:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-15 14:24 [RFC PATCH 0/9] Narrow/Sparse checkout round 3: "easy mode" Nguyễn Thái Ngọc Duy
2008-08-16 10:31 ` Junio C Hamano
2008-08-17  5:12   ` Nguyen Thai Ngoc Duy
2008-08-17  5:50     ` Junio C Hamano
2008-08-17  6:10       ` Junio C Hamano
2008-08-17  9:49         ` [RFC PATCH 0/9] Narrow/Sparse checkout round 3: Eric Raible
2008-08-19  9:06           ` Junio C Hamano
2008-08-17 13:36         ` Nguyen Thai Ngoc Duy [this message]
2008-08-19 21:10 ` [RFC PATCH 0/9] Narrow/Sparse checkout round 3: "easy mode" James Pickens
2008-08-30  9:21   ` 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=fcaeb9bf0808170636j3c273ef9sfa55c8e432ab1293@mail.gmail.com \
    --to=pclouds@gmail.com \
    --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).