git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Aug 17, 2008, 05:12 UTC
Message-ID
<fcaeb9bf0808162212y756465a5ib7ce3a8849765033@mail.gmail.com>
In-Reply-To
<7v1w0pdze0.fsf@gitster.siamese.dyndns.org>
On 8/16/08, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
>  > Another difference from the last round is "narrow rules" will not be preserved
>  > when switching branches. When you switch branch with no option, you will get
>  > full checkout. You may want to use --path|--add-path|--remove-path when
>  > switching branches to have narrow checkout again.
>
>
> You could save the "narrow rules" in the extension section of the index.
>  If the final form of this series needs to use a separate CE_NO_CHECKOUT
>  bit (which would make the resulting index incompatible with the current
>  git), the narrow rules section can be marked as "your git must understand
>  this" class of extension to make sure that people do not mistakenly access
>  an index written by this new version of git with the current or older git.
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?
 - consider only a and b in narrow area (new files not counted)
 - consider the whole directory in narrow area (new files counted)

This does not matter until we implement strict mode that only checkout new files inside narrow area (the usage is similar to submodule).

Show 5 quoted lines
>  > Now back to technical POV. I did not reuse CE_VALID (assume unchanged) bit
>  > because it has been used for core.ignorestat.
>
>
> I am not sure what's the relation between these two.

Because the usage is different? When you "git update-index foo" with core.ignorestat=1, it will mark it CE_VALID. And if the same bit is used for narrow checkout, the file is considered not existing in workdir. I'd expect foo is still in my narrow area after "git update-index foo".

-- 
Duy
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 10 in “Narrow/Sparse checkout round 3: "easy mode"”
  1. 0/9 Narrow/Sparse checkout round 3: "easy mode"Nguyễn Thái Ngọc Duy, Aug 15, 2008
  2. Junio C HamanoAug 16, 2008
  3. Nguyen Thai Ngoc DuyAug 17, 2008
  4. Junio C HamanoAug 17, 2008
  5. Junio C HamanoAug 17, 2008
  6. Eric RaibleAug 17, 2008
  7. Junio C HamanoAug 19, 2008
  8. Nguyen Thai Ngoc DuyAug 17, 2008
  9. James PickensAug 19, 2008
  10. Nguyen Thai Ngoc DuyAug 30, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.