From: skillzero@gmail.com
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>,
Jakub Narebski <jnareb@gmail.com>,
Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
git@vger.kernel.org
Subject: Re: [RFC PATCH v3 8/8] --sparse for porcelains
Date: Mon, 17 Aug 2009 17:23:39 -0700 [thread overview]
Message-ID: <2729632a0908171723n1c70798bp3169c813d5734c70@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0908180111340.8306@pacific.mpi-cbg.de>
On Mon, Aug 17, 2009 at 4:16 PM, Johannes
Schindelin<Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Mon, 17 Aug 2009, skillzero@gmail.com wrote:
>
>> On Mon, Aug 17, 2009 at 3:02 PM, Johannes
>> Schindelin<Johannes.Schindelin@gmx.de> wrote:
>>
>> > And here comes the problem: if something is treated untracked because
>> > it was outside of the sparse checkout, then I want it to be treated as
>> > untracked _even if_ I happened to broaden the checkout by editing
>> > .git/info/sparse. The file did not just magically become subject to
>> > overwriting just because I edited .git/info/sparse (which could be a
>> > simple mistake).
>>
>> Maybe I'm misunderstanding what you're saying, but why would you want a
>> file that's become part of the checkout by editing .git/info/sparse to
>> still be treated as untracked?
>>
>> If I have a file on that's excluded via .git/info/sparse then I edit
>> .git/info/sparse to include it and switch to a branch that doesn't have
>> that file, I'd expect that file to be deleted from the working copy if
>> the content matches what's in the repository. If it's modified then I'd
>> expect the branch switch to fail (like it would without a sparse
>> checkout).
>
> First things first: with sparse checkout, you should not check out
> _anything_ outside of the focus of the sparse checkout.
>
> So I contend that you would only end up with a sparse'd-out file
> that was formerly tracked if you did something wrong. That should not
> happen.
I was thinking if you copied the file there manually and changed
.git/info/sparse to include it. I would expect git checkout, git
status, etc. to act as just as if I had never excluded it via
.git/info/sparse, similar to .gitignore and .git/info/exclude.
> The thing is: we need a way to determine quickly and without any
> ambiguity whether a file is tracked, assumed unchanged, or sparse'd-out
> (which Nguyễn calls no-checkout).
>
> And if we change .git/info/sparse, that state _must not_ change. We did
> not touch the file by editing .git/info/sparse, so the state must be
> unchanged.
I don't know enough to have an opinion on assume-unchanged vs
no-checkout, but if you edit .git/info/sparse it seems like it should
affect whether git cares about a file or not. If a file previously had
the no-checkout bit and you change .git/info/sparse to include the
file, the next time you do something with git, I would expect it to
start caring about that path. For example, I can edit .gitignore and
.git/info/exclude and it notices the next time I use git without
having to do anything special.
next prev parent reply other threads:[~2009-08-18 0:23 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-11 15:43 [RFC PATCH v3 0/8] Sparse checkout Nguyễn Thái Ngọc Duy
2009-08-11 15:43 ` [RFC PATCH v3 1/8] Prevent diff machinery from examining assume-unchanged entries on worktree Nguyễn Thái Ngọc Duy
2009-08-11 15:44 ` [RFC PATCH v3 2/8] Avoid writing to buffer in add_excludes_from_file_1() Nguyễn Thái Ngọc Duy
2009-08-11 15:44 ` [RFC PATCH v3 3/8] Read .gitignore from index if it is assume-unchanged Nguyễn Thái Ngọc Duy
2009-08-11 15:44 ` [RFC PATCH v3 4/8] excluded_1(): support exclude "directories" in index Nguyễn Thái Ngọc Duy
2009-08-11 15:44 ` [RFC PATCH v3 5/8] dir.c: export excluded_1() and add_excludes_from_file_1() Nguyễn Thái Ngọc Duy
2009-08-11 15:44 ` [RFC PATCH v3 6/8] unpack-trees.c: generalize verify_* functions Nguyễn Thái Ngọc Duy
2009-08-11 15:44 ` [RFC PATCH v3 7/8] Support sparse checkout in unpack_trees() and read-tree Nguyễn Thái Ngọc Duy
2009-08-11 15:44 ` [RFC PATCH v3 8/8] --sparse for porcelains Nguyễn Thái Ngọc Duy
2009-08-12 6:33 ` Junio C Hamano
2009-08-12 10:01 ` Nguyen Thai Ngoc Duy
2009-08-13 7:20 ` Nguyen Thai Ngoc Duy
2009-08-13 9:58 ` Jakub Narebski
2009-08-13 12:38 ` Nguyen Thai Ngoc Duy
2009-08-14 20:23 ` Jakub Narebski
2009-08-15 2:01 ` Junio C Hamano
2009-08-15 23:37 ` Jakub Narebski
2009-08-16 8:14 ` Johannes Schindelin
2009-08-17 9:08 ` Johannes Schindelin
2009-08-17 12:49 ` Nguyen Thai Ngoc Duy
2009-08-17 13:35 ` Johannes Schindelin
2009-08-17 14:41 ` Nguyen Thai Ngoc Duy
2009-08-17 15:19 ` Johannes Schindelin
2009-08-17 16:13 ` Nguyen Thai Ngoc Duy
2009-08-17 15:41 ` Junio C Hamano
2009-08-17 16:06 ` Nguyen Thai Ngoc Duy
2009-08-17 16:19 ` Johannes Schindelin
2009-08-17 18:39 ` Junio C Hamano
2009-08-17 22:02 ` Johannes Schindelin
2009-08-17 23:02 ` skillzero
2009-08-17 23:16 ` Johannes Schindelin
2009-08-18 0:17 ` Jakub Narebski
2009-08-18 0:34 ` skillzero
2009-08-18 1:43 ` Nguyen Thai Ngoc Duy
2009-08-18 6:25 ` git find (was: [RFC PATCH v3 8/8] --sparse for porcelains) Jakub Narebski
2009-08-18 14:35 ` Nguyen Thai Ngoc Duy
2009-08-18 16:00 ` Jakub Narebski
2009-08-18 0:49 ` [RFC PATCH v3 8/8] --sparse for porcelains Jakub Narebski
2009-08-18 0:23 ` skillzero [this message]
2009-08-17 16:46 ` Junio C Hamano
2009-08-17 21:45 ` Johannes Schindelin
2009-08-17 16:01 ` Jakub Narebski
2009-08-12 7:31 ` Johannes Sixt
2009-08-12 9:53 ` Nguyen Thai Ngoc Duy
2009-08-12 15:40 ` Raja R Harinath
2009-08-13 7:37 ` Johannes Sixt
2009-08-11 21:18 ` [RFC PATCH v3 7/8] Support sparse checkout in unpack_trees() and read-tree skillzero
2009-08-11 21:38 ` Jakub Narebski
2009-08-11 22:03 ` skillzero
2009-08-12 1:30 ` Nguyen Thai Ngoc Duy
2009-08-12 4:59 ` skillzero
2009-08-12 2:51 ` [RFC PATCH v3 3/8] Read .gitignore from index if it is assume-unchanged Junio C Hamano
2009-08-13 6:37 ` Nguyen Thai Ngoc Duy
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=2729632a0908171723n1c70798bp3169c813d5734c70@mail.gmail.com \
--to=skillzero@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jnareb@gmail.com \
--cc=pclouds@gmail.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).