Stephen Leake <[EMAIL PROTECTED]> writes:
> Ok, so there needs to be a third branch (a 'cond' instead of 'if').
Or two if's.
(dvc-run-dvc-async 'xgit `(commit ,(when ... "-a")
,@(when ... file-list))
...)
> I can see that would be convenient if I'm only using the command line.
>
> But if you are using DVC, surely marked files in the ewoc are even
> more convenient?
First, it's also conveinient if you're using both Emacs and the
command-line (that's my case. Saint Ignucius will probably forgive me
since I run the command line inside Emacs).
But more important, the index stuff in git is much more general than
just marking files. There are several things you can hardly do with
just marking files, like
* git add -i : allows you to add patch hunks to the index, not just
whole files. DVC doesn't expose this, but could very easily have an
xgit-add-interactive function that would do i.e. (ansi-term
"git add -i").
* git diff Vs git diff --cached : git diff shows you what you didn't
add to the index yet, and git diff --cached what you're about to
commit. You can use that to do intermediate validations of your code
while writting a long patch : do something, check with "git diff"
that it's OK, git add, and continue. I use that when I have several
steps and when the intermediate steps do not deserve to be commited
(regression or uncompilable code).
* Interaction with other git tools. I mentionned Emacs Vs
command-line, but one may also want to use git-gui or so.
>>> But using xgit-add, instead of some other/new DVC front-end function,
>>> means the DVC user interface will not show the list of files to
>>> commit. That's a serious problem.
>>
>> The status buffer should show them.
>
> I agree that it _should_. I'm trying to understand how to make that
> happen.
>
>> For example, here's what the command-line gives you:
>>
>> <snip>
>
> Ok.
>
> How should this information be displayed in DVC?
IMO, it should just be displayed in a way similar to what the command
line does. The ewoc structure used for status allows "messages", so we
can have
'(message "On branch ...")
'(message "Changes to be committed:")
'(file "file1" ....)
'(file "another-file" ....)
'(message "Changed but not updated")
...
> And if the user calls xgit-add after dvc-status, how should the
> display be updated?
In that proposal, files should move from the bottom section to the top
one.
(note: it's possible that a file appear in both sections)
--
Matthieu
_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev