Michael Olson <[EMAIL PROTECTED]> writes: > Hmm. At first I didn't like the idea, but being able to diff against > just the index would indeed be useful. When it comes to checking in the > commit log, however, I would want it to only affect the case where a > partial commit is being done, and *not* the case there a normal commit > is being done.
That's precisely why I'm suggesting a variable, and not just a different shortcut for commit. Note that "partial commit" is slightly incorrect here. I often use the index, and rarely actually do a partial commit. I just validate what I want to commit with git-add, and then run commit. BTW, in the command-line interface, if you've set color.status=auto, the changes staged for commit appear in green, and the others in red. So, you just review and git-add untill git-status is all green. One thing I don't know how to deal with is that in the flow where you intend to run commit without -a, both "git diff" and "git diff --cached" make sense. I'd say M-x xgit-diff RET should run "git diff", which is the least surprising for git users, but there should probably be a M-x xgit-diff-cached RET too. In an ideal world, there would be also a view with Emacs splitted in two parts, with "diff" on the one side, and "diff --cached" on the other, with shortcuts to move patch hunks from a view to the other. > The value itself should be a customizable option, defaulting to nil > (perhaps) in order to keep the surprise factor to a minimum for > other VCS users. The default value is indeed hard to choose. nil makes DVC-git less surprising for users of other tools, but t makes it less surprising for git users. There used to be cogito, which was a kind of extra layer on top of git, which hided the index, but it's deprecated. Tools I know that use git do make the index visible to the user (but I don't know most of them indeed). So, it's not stupid to follow the trend in the git community. -- Matthieu _______________________________________________ Dvc-dev mailing list [email protected] https://mail.gna.org/listinfo/dvc-dev
