Subject: Re: [RFC PATCH v3 8/8] --sparse for porcelains

From: Junio C Hamano <[email-masked]>
Date: Mon, 17 Aug 2009 11:39:13 -0700

Johannes Schindelin <[email-masked]> writes:

> However, my illustration of the scenario was only to one end, namely to 
> convince all of you that assume-changed != sparse.
>
> And maybe to the end to explain that sparse checkout could help this guy.

How?  If sparse is _not to check it out_, then that is not what the person
is doing either.  It feels to me that you are suggesting an inappropriate
hack to replace another inappropriate hack, suggesting to use a hacksaw
because an earlier attempt to use a hammer did not quite work to drive the
screw in.

I never said assume-unchanged _is_ sparse.  You cannot mark an index entry
that does not exist, obviously you need more (either the earlier "hook
that tells what should/shouldn't exist", or "the pattern").

But I think the work-tree semantics you need to _implement_ sparse matches
what you would want from assume-unchanged.  Not the original, draconian
one that updates the work tree by saying "you promised me you wouldn't
change them", but the updated one that tells git to pretend that the local
change is not there but still keep the local modification, including
deletion.  The work-tree "local changes" sparse makes is a small subset of
possible local changes assume-unchanged would need to support.  It only
deletes work tree files.