gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: request for comments on partial commits


From: Lionel Elie Mamane
Subject: Re: [Gnu-arch-users] Re: request for comments on partial commits
Date: Tue, 11 Apr 2006 04:53:57 +0200
User-agent: Mutt/1.5.11+cvs20060126

On Thu, Feb 23, 2006 at 11:20:08AM -0500, Stefan Monnier wrote:

>>> Hi, for the partial commit problem I am thinking of a simple method:
>>> the user will have to commit the whole tree after a file renaming
>>> or file deletion operation, which means the change to the
>>> directory content.  Are there any objection to this approach as a
>>> short-term measure?

>> Short term, it is OK, but long term you want:
>>  - For every smallest set S of file names such that S is stable by the
>>    operation "f got moved to f'", the user has to commit either all
>>    files whose old or new name is in S.

> Yes.

>> Implementing the graph walking algorithms to find the partition of
>> files in S's in C is left as an exercise to the reader.

> I don't see any graph-walking here: check the status of the selected files.
> - if a file was only modified it's OK.
> - if a file was moved within the set, it's OK.
> - if a file was added/removed from the set, then do a full-tree traversal
>   to determine whether it was moved to/from the selected set (in which case
>   we have an error) or whether it was really added/removed to/from the whole
>   tree, in which case it's also OK.

Ah, yes! You make me realise that a file is only moved ... once! I was
thinking of multiple move operations: A -> B -> C -> D, but really, if
the user does these moves consecutively, it is seen as exactly A -> D.

-- 
Lionel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]