Re: [PATCH v2 10/10] dir: do not use untracked cache ident anymore
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 15, 2015, 19:49 UTC
- Message-ID
- <xmqqd1u7fq5r.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1450196907-17805-11-git-send-email-chriscool@tuxfamily.org>
Christian Couder <christian.couder@gmail.com> writes:
> +/* > + * We used to save the location of the work tree and the kernel version, > + * but it was not a good idea, so we now just save an empty string. > + */
I do agree that storing the kernel version (or hostname or whatever specific to the machine) was not a good idea. I however suspect that you must save and check the location of the working tree, though, for correctness. If you use one GIT_DIR and GIT_WORK_TREE to do "git add" or whatever, and then use the same GIT_DIR but a different GIT_WORK_TREE, you should be able to notice that a directory D in the old GIT_WORK_TREE whose modification time you recorded is different from the directory D with the same name but in the new GIT_WORK_TREE, no?