Hi, On Sun, 16 Aug 2009, Johannes Schindelin wrote: > [...] if you want to say that assume-unchanged and sparse are two > fundamentally different things, I would be interested in some equally > convincing argument as for the shallow/graft issue. > > There is a fundamental difference, I grant you that: the working > directory does not contain the "sparse'd away" files while the same is > not true for assume-unchanged files. > > But does that matter? The corresponding files are still in the index > and the repository. > > IOW under what circumstances would you want to be able to discern > between assume-unchanged and "sparse'd away" files in the working > directory? > > I could _imagine_ that you'd want a tool that allows you to change the > focus of the sparse checkout together with the working directory. > Example: you have a sparse checkout of Documentation/ and now you want > to have t/, too. Just changing .git/info/sparse will not be enough. > > The question is if the tool to change the "sparseness" [*1*] should not > change .git/info/sparse itself; if it does not, it would be good to be > able to discern between the "assume-unchanged" and "sparse'd away" > files. > > Although it might be enough to traverse the index and check the presence > of the assume-unchanged files in the working directory to determine > which files are sparse, and which ones are merely assume-unchanged. > > Ciao, > Dscho > > Footnote [*1*]: I think we need some nice and clear nomenclature here. > Any English wizards with a good taste of naming things? Turns out that somebody on IRC had a problem that requires to have sparse'd out files which _do_ have working directory copies. So just having the assume-changed bit may not be enough. The scenario is this: the repository contains a file that users are supposed to change, but not commit to (only the super-intelligent inventor of this scenario is allowed to). As this repository is originally a subversion one, there is no problem: people just do not switch branches. But this guy uses git-svn, so he does switch branches, and to avoid committing the file by mistake, he marked it assume-unchanged. Only that a branch switch overwrites the local changes. I suggested the use of the sparse feature, and mark this file (and this file alone) as sparse'd-out. Is this an intended usage scenario? Then we cannot reuse the assume-changed bit [*1*]. Ciao, Dscho Footnote [*1*]: in this particular scenario, we could still discern between sparse'd-out and regular assume-unchanged file, because .git/info/sparse knows about the file. But the design is now brittle, and it is not hard at all to come up with a situation where it breaks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html