Matthieu Moy <[EMAIL PROTECTED]> writes:

> Stephen Leake <[EMAIL PROTECTED]> writes:
>
>> Then all back-ends would commit all files (or possibly no files),
>> rather than the correct list of files, if the user had marked some.
>> That's wrong.
>
> It doesn't change the existing behavior:
>
> You can already do something like
>
> Run dvc-status
> Run dvc-diff
> Run dvc-log-edit <-- partner buffer is diff.
> switch to dvc-status
> mark files
> switch back to dvc-log-edit without running log-edit
> commit.
>
> You mark files at some point in time, but you don't commit them
> individually.

Yes, that is true, and also bad, and DVC should either not allow this,
or fix it in some way. This is the use-case for a "read-only" diff.

But in this case, it is clear the user is abusing DVC; they've started
two commit views into the same workspace. That's similar to opening
two Emacsen, and editing the same file in each; users should know not
to do that.

In the dvc-add-log-entry case, the user is not doing anything wrong.
The sequence is:

run dvc-status
view a source diff with ediff
run dvc-add-log-entry
    which runs dvc-log-edit, setting partner buffer to source
mark files in dvc-status buffer
run dvc-log-edit-done

This is a quite reasonable work flow, and gives the wrong result.

> Individual files commit is always done with respect to the buffer
> you're comming from.

In this case, you interpret "comming from" as the source buffer, but I
interpret it as the status buffer.

The fact that the log-edit buffer happened to be created by a
keystroke that was executed with the source buffer current is
accidental; making that source buffer define the list of files to
commit is _not_ what the user intends here. They are doing a commit,
with the list of files to commit in the status buffer. DVC should
understand and expect that.

We need to come to some compromise that we can all live with.

You are rejecting solution 1 (set dvc-partner-buffer to the status
or diff buffer in this case). That's fine.

Is solution 2 acceptable (new dvc-files-buffer variable)? It works for
me, and I think, from what you have said so far, that it would work
for you. But I'm not sure.

Solution 0 also works for me.

Is there another solution?

-- 
-- Stephe

_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to