Matthieu Moy <[EMAIL PROTECTED]> writes: > 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.
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.
Maybe we could add a message at around the second line of the diff
buffer to indicate that it is using the index. No message would be
displayed if not using the index.
It could be toggled perhaps with M-x xgit-use-index, which would print
either "DVC will use the index in git projects" or "DVC will not use the
index in git projects" after changing the value. 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.
--
Michael Olson -- FSF Associate Member #652 |
http://mwolson.org/ -- Jabber: mwolson_at_hcoop.net | /` |\ | | |
Sysadmin -- Hobbies: Lisp, GP2X, HCoop | |_] | \| |_|
Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner |
pgp6PwCRRmRJq.pgp
Description: PGP signature
_______________________________________________ Dvc-dev mailing list [email protected] https://mail.gna.org/listinfo/dvc-dev
