Michael Olson <[EMAIL PROTECTED]> writes: > How about letting C-u C-c C-c from the log-edit buffer mean "Don't > commit everything -- just the files that the user has added > themself."
Something like this should be done, yes. C-u C-c C-c is an option. I was thinking of a global variable to say "I'm going to use -a/I'm not going to use -a" otherwise. That would change the behavior of commit, but potentially also the one of status (status -a Vs status) and diff (diff HEAD Vs diff --cached and diff). I'd call that xgit-use-index, and if set to nil, xgit would be similar to other back-ends (diff runs "diff HEAD", status runs "status -a", ... the user doesn't even have to know that the index exists), and if set to t, xgit would behave as if the "-a" option didn't exist. The drawback of this approach is that it's easy to forget the value of the configuration variable, and run commit thinking xgit is in a mode while it's actually in the other. So, with this approach, we need to find a way to allow changing the value of xgit-use-index easily, and a way to remind the user of the value of the variable. > No filenames would need to be passed to the commit command, and any > marks in the status buffer would not have any effect in this case. Since one can run $ git commit file1 file2 I think it makes sense to just call this when there are marked files, even if the user didn't ask for "commit -a". OTOH, since this seems to be equivalent to the version with -a, it doesn't add any feature. > git seems to be the only backend that can do a partial commit without > listing all the files on the "commit" command. So for other backends, > doing C-u C-c C-c would just fall back to a normal commit. Yes. -- Matthieu _______________________________________________ Dvc-dev mailing list [email protected] https://mail.gna.org/listinfo/dvc-dev
