git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Christian Couder <christian.couder@gmail.com>, git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Nguyen Thai Ngoc Duy" <pclouds@gmail.com>,
	"David Turner" <dturner@twopensource.com>,
	"Eric Sunshine" <sunshine@sunshineco.com>,
	"Christian Couder" <chriscool@tuxfamily.org>
Subject: Re: [PATCH v5 08/11] dir: simplify untracked cache "ident" field
Date: Sat, 16 Jan 2016 15:55:22 +0100	[thread overview]
Message-ID: <569A59DA.9050008@web.de> (raw)
In-Reply-To: <1452841192-620-9-git-send-email-chriscool@tuxfamily.org>



On 2016-01-15 07.59, Christian Couder wrote:
> 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.

  reply	other threads:[~2016-01-16 14:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15  6:59 [PATCH v5 00/11] Untracked cache improvements Christian Couder
2016-01-15  6:59 ` [PATCH v5 01/11] dir: free untracked cache when removing it Christian Couder
2016-01-15  6:59 ` [PATCH v5 02/11] update-index: use enum for untracked cache options Christian Couder
2016-01-15  6:59 ` [PATCH v5 03/11] update-index: add --test-untracked-cache Christian Couder
2016-01-15  6:59 ` [PATCH v5 04/11] update-index: add untracked cache notifications Christian Couder
2016-01-15  6:59 ` [PATCH v5 05/11] update-index: move 'uc' var declaration Christian Couder
2016-01-15  6:59 ` [PATCH v5 06/11] dir: add {new,add}_untracked_cache() Christian Couder
2016-01-15  6:59 ` [PATCH v5 07/11] dir: add remove_untracked_cache() Christian Couder
2016-01-15  6:59 ` [PATCH v5 08/11] dir: simplify untracked cache "ident" field Christian Couder
2016-01-16 14:55   ` Torsten Bögershausen [this message]
2016-01-15  6:59 ` [PATCH v5 09/11] config: add core.untrackedCache Christian Couder
2016-01-15 20:15   ` Junio C Hamano
2016-01-15  6:59 ` [PATCH v5 10/11] test-dump-untracked-cache: don't modify the untracked cache Christian Couder
2016-01-15 20:16   ` Junio C Hamano
2016-01-20 10:12     ` Christian Couder
2016-01-15  6:59 ` [PATCH v5 11/11] t7063: add tests for core.untrackedCache Christian Couder
2016-01-15 20:16 ` [PATCH v5 00/11] Untracked cache improvements Junio C Hamano
2016-01-16 14:57 ` Torsten Bögershausen
2016-01-19 14:43   ` Christian Couder
2016-01-19 17:47     ` Junio C Hamano

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=569A59DA.9050008@web.de \
    --to=tboegi@web.de \
    --cc=avarab@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=christian.couder@gmail.com \
    --cc=dturner@twopensource.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    --cc=sunshine@sunshineco.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).