Re: [RFC PATCH 0/9] Narrow/Sparse checkout round 3: "easy mode"

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Saturday, August 16, 2008 - 10:50 pm

"Nguyen Thai Ngoc Duy" <pclouds@gmail.com> writes:


I'd expect that this sequence:

	git checkout --set-no-checkout arch include
        git checkout arch/x86 include/asm-x86

to set up narrowing rules to (1) exclude everything in arch/ and include/
area by default, but (2) allow checking out everything in arch/x86/ and
include/asm-x86/ that currently exist _and_ will exist in different commits
when we switch to.

On the other hand, if I did this after the above two-command sequence:

	git checkout include/Kbuild

then I'd expect only that file to be added to the checkout set.  I think
you can record list of pathspecs (with positive and negative) to implement
that semantics, no?


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.

By the way, "uint" and "ushort" in struct ondisk_cache_entry are 4-byte
and 2-byte network byte order integers; should we write them as uint32_t
and uint16_t instead in the longer run?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 0/9] Narrow/Sparse checkout round 3: &quot;easy mode&quot;, Nguyễn Thái Ngọc, (Fri Aug 15, 7:24 am)
Re: [RFC PATCH 0/9] Narrow/Sparse checkout round 3: &quot;easy ..., Nguyen Thai Ngoc Duy, (Sat Aug 16, 10:12 pm)
Re: [RFC PATCH 0/9] Narrow/Sparse checkout round 3: "easy ..., Junio C Hamano, (Sat Aug 16, 10:50 pm)
Re: [RFC PATCH 0/9] Narrow/Sparse checkout round 3: &quot;easy ..., Nguyen Thai Ngoc Duy, (Sun Aug 17, 6:36 am)