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

Re: [PATCH v3 10/23] untracked cache: save to an index extension

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Dec 9, 2014, 23:28 UTC
Message-ID
<CAPig+cTB6=aFR8HFOtdbGi1h9EXcOdfNB=N=THz-DgzytQ2ceA@mail.gmail.com>
In-Reply-To
<1418047507-22892-12-git-send-email-pclouds@gmail.com>
On Mon, Dec 8, 2014 at 9:04 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 43 quoted lines
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> diff --git a/Documentation/technical/index-format.txt b/Documentation/technical/index-format.txt
> index fe6f316..b97ac8d 100644
> --- a/Documentation/technical/index-format.txt
> +++ b/Documentation/technical/index-format.txt
> @@ -233,3 +233,61 @@ Git index format
>    The remaining index entries after replaced ones will be added to the
>    final index. These added entries are also sorted by entry namme then
>    stage.
> +
> +== Untracked cache
> +
> +  Untracked cache saves the untracked file list and necessary data to
> +  verify the cache. The signature for this extension is { 'U', 'N',
> +  'T', 'R' }.
> +
> +  The extension starts with
> +
> +  - Stat data of $GIT_DIR/info/exclude. See "Index entry" section from
> +    ctime field until "file size".
> +
> +  - Stat data of core.excludesfile
> +
> +  - 32-bit dir_flags (see struct dir_struct)
> +
> +  - 160-bit SHA-1 of $GIT_DIR/info/exclude. Null SHA-1 means the file
> +    does not exist.
> +
> +  - 160-bit SHA-1 of core.excludesfile. Null SHA-1 means the file does
> +    not exist.
> +
> +  - NUL-terminated string of per-dir exclude file name. This usually
> +    is ".gitignore".
> +
> +  - The number of following directory blocks, variable width
> +    encoding. If this number is zero, the extension ends here with a
> +    following NUL.
> +
> +  - A number of directory blocks in depth-first-search order, each
> +    consists of
> +
> +    - The number of untracked entries, variable witdh encoding.
s/witdh/width/
> +    - The number of sub-directory blocks, variable with encoding.
s/with/width/
Show 22 quoted lines
> +    - The directory name terminated by NUL.
> +
> +    - A number of untrached file/dir names terminated by NUL.
> +
> +The remaining data of each directory block is grouped by type:
> +
> +  - An ewah bitmap, the n-th bit marks whether the n-th directory has
> +    valid untracked cache entries.
> +
> +  - An ewah bitmap, the n-th bit records "check-only" bit of
> +    read_directory_recursive() for the n-th directory.
> +
> +  - An ewah bitmap, the n-th bit indicates whether SHA-1 and stat data
> +    is valid for the n-th directory and exists in the next data.
> +
> +  - An array of stat data. The n-th data corresponds with the n-th
> +    "one" bit in the previous ewah bitmap.
> +
> +  - An array of SHA-1. The n-th SHA-1 corresponds with the n-th "one" bit
> +    in the previous ewah bitmap.
> +
> +  - One NUL.
Previous: Nguyễn Thái Ngọc DuyNext: Duy Nguyen
Message 14 of 35 in “nd/untracked-cache updates”
  1. 00/23 nd/untracked-cache updatesNguyễn Thái Ngọc Duy, Dec 8, 2014
  2. checkout: add --ignore-other-wortreesNguyễn Thái Ngọc Duy, Dec 8, 2014
  3. Duy NguyenDec 8, 2014
  4. 01/23 dir.c: optionally compute sha-1 of a .gitignore fileNguyễn Thái Ngọc Duy, Dec 8, 2014
  5. 02/23 untracked cache: record .gitignore information and dir hierarchyNguyễn Thái Ngọc Duy, Dec 8, 2014
  6. 03/23 untracked cache: initial untracked cache validationNguyễn Thái Ngọc Duy, Dec 8, 2014
  7. 04/23 untracked cache: invalidate dirs recursively if .gitignore changesNguyễn Thái Ngọc Duy, Dec 8, 2014
  8. 05/23 untracked cache: make a wrapper around {open,read,close}dir()Nguyễn Thái Ngọc Duy, Dec 8, 2014
  9. 06/23 untracked cache: record/validate dir mtime and reuse cached outputNguyễn Thái Ngọc Duy, Dec 8, 2014
  10. 07/23 untracked cache: mark what dirs should be recursed/savedNguyễn Thái Ngọc Duy, Dec 8, 2014
  11. 08/23 untracked cache: don't open non-existent .gitignoreNguyễn Thái Ngọc Duy, Dec 8, 2014
  12. 09/23 ewah: add convenient wrapper ewah_serialize_strbuf()Nguyễn Thái Ngọc Duy, Dec 8, 2014
  13. 10/23 untracked cache: save to an index extensionNguyễn Thái Ngọc Duy, Dec 8, 2014
  14. Eric SunshineDec 9, 2014
  15. Duy NguyenDec 10, 2014
  16. 11/23 untracked cache: load from UNTR index extensionNguyễn Thái Ngọc Duy, Dec 8, 2014
  17. Junio C HamanoDec 15, 2014
  18. 12/23 untracked cache: invalidate at index addition or removalNguyễn Thái Ngọc Duy, Dec 8, 2014
  19. 13/23 read-cache.c: split racy stat test to a separate functionNguyễn Thái Ngọc Duy, Dec 8, 2014
  20. 14/23 untracked cache: avoid racy timestampsNguyễn Thái Ngọc Duy, Dec 8, 2014
  21. 15/23 untracked cache: print stats with $GIT_TRACE_UNTRACKED_STATSNguyễn Thái Ngọc Duy, Dec 8, 2014
  22. 16/23 untracked cache: mark index dirty if untracked cache is updatedNguyễn Thái Ngọc Duy, Dec 8, 2014
  23. 17/23 untracked-cache: temporarily disable with $GIT_DISABLE_UNTRACKED_CACHENguyễn Thái Ngọc Duy, Dec 8, 2014
  24. 18/23 status: enable untracked cacheNguyễn Thái Ngọc Duy, Dec 8, 2014
  25. 19/23 update-index: manually enable or disable untracked cacheNguyễn Thái Ngọc Duy, Dec 8, 2014
  26. 20/23 update-index: test the system before enabling untracked cacheNguyễn Thái Ngọc Duy, Dec 8, 2014
  27. 21/23 t7063: tests for untracked cacheNguyễn Thái Ngọc Duy, Dec 8, 2014
  28. 22/23 mingw32: add uname()Nguyễn Thái Ngọc Duy, Dec 8, 2014
  29. 23/23 untracked cache: guard and disable on system changesNguyễn Thái Ngọc Duy, Dec 8, 2014
  30. brian m. carlsonDec 9, 2014
  31. Duy NguyenDec 9, 2014
  32. Torsten BögershausenDec 10, 2014
  33. Duy NguyenDec 10, 2014
  34. Torsten BögershausenDec 11, 2014
  35. Duy NguyenDec 15, 2014

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.