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

Re: [PATCH v5 08/11] dir: simplify untracked cache "ident" field

From
Torsten Bögershausen <tboegi@web.de>
Date
Jan 16, 2016, 14:55 UTC
Message-ID
<569A59DA.9050008@web.de>
In-Reply-To
<1452841192-620-9-git-send-email-chriscool@tuxfamily.org>
On 2016-01-15 07.59, Christian Couder wrote:
Show 23 quoted lines
> It is not a good idea to compare kernel versions and disable
> the untracked cache if it changes as people may upgrade and
> still want the untracked cache to work. So let's just
> compare work tree locations and kernel name to decide if we
> should disable it.
>
> Also it's not useful to store many locations in the ident
> field and compare to any of them. It can even be dangerous
> if GIT_WORK_TREE is used with different values. So let's
> just store one location, the location of the current work
> tree.
>
> If this location changed and we still want an untracked
> cache, let's delete the cache and recreate it.
>
> Note that if an untracked cache has been created by a
> previous Git version, then the kernel version is stored in
> the ident field. As we now compare with just the kernel
> name the comparison will fail and the untracked cache will
> be disabled until it's recreated.
>
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> Helped-by: Torsten Bögershausen <tboegi@web.de>
This could be my version of a commit message:

It is not a good idea to compare kernel versions and disable the untracked cache if it changes as people may upgrade and still want the untracked cache to work.

Drop the major and minor version from uname stored in ident.
It can be dangerous if GIT_WORK_TREE is used with different values.

So let's simplify the handling and store just store one line, the uname of the system the location of the current work tree.

If this location changed and we still want an untracked cache, let's delete the cache and recreate it.

The untracked cache can only be used by one type of OS, exporting a git repo to different clients via a network to e.g. Linux and Windows means that only one can use the untracked cache.

Note that if an untracked cache has been created by a previous Git version, then the kernel version is stored in the ident field. As we now compare with just the kernel name the comparison will fail and the untracked cache will be disabled until it's recreated.

Previous: Christian CouderNext: Christian Couder
Message 10 of 20 in “Untracked cache improvements”
  1. 00/11 Untracked cache improvementsChristian Couder, Jan 15, 2016
  2. 01/11 dir: free untracked cache when removing itChristian Couder, Jan 15, 2016
  3. 02/11 update-index: use enum for untracked cache optionsChristian Couder, Jan 15, 2016
  4. 03/11 update-index: add --test-untracked-cacheChristian Couder, Jan 15, 2016
  5. 04/11 update-index: add untracked cache notificationsChristian Couder, Jan 15, 2016
  6. 05/11 update-index: move 'uc' var declarationChristian Couder, Jan 15, 2016
  7. 06/11 dir: add {new,add}_untracked_cache()Christian Couder, Jan 15, 2016
  8. 07/11 dir: add remove_untracked_cache()Christian Couder, Jan 15, 2016
  9. 08/11 dir: simplify untracked cache "ident" fieldChristian Couder, Jan 15, 2016
  10. Torsten BögershausenJan 16, 2016
  11. 09/11 config: add core.untrackedCacheChristian Couder, Jan 15, 2016
  12. Junio C HamanoJan 15, 2016
  13. 10/11 test-dump-untracked-cache: don't modify the untracked cacheChristian Couder, Jan 15, 2016
  14. Junio C HamanoJan 15, 2016
  15. Christian CouderJan 20, 2016
  16. 11/11 t7063: add tests for core.untrackedCacheChristian Couder, Jan 15, 2016
  17. Junio C HamanoJan 15, 2016
  18. Torsten BögershausenJan 16, 2016
  19. Christian CouderJan 19, 2016
  20. Junio C HamanoJan 19, 2016

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.