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

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

Re: [Gnu-arch-users] Re: file-limited commit on new file


From: Miles Bader
Subject: Re: [Gnu-arch-users] Re: file-limited commit on new file
Date: Fri, 2 Jan 2004 19:17:10 -0500
User-agent: Mutt/1.3.28i

On Fri, Jan 02, 2004 at 11:28:26PM +0000, Stig Brautaset wrote:
> Oops. "Houston, we have a problem..." ;)
> 
> I don't think the added complexity necessary for dealing with such
> errors is worth it. Just undo, commit (adding the new file), then redo.

As was pointed out in the previous threads, there are natural and consistent
methods of dealing with such cases.  Adding a new file and wanting to commit
only it in the presence of other changes is very common, so it's worth
handling correctly.

The undo recipe you mention often won't work because -- in my experience --
one usually realizes the need to commit the new file _after_ adding it, so
you really have to do something like:

   mv new-file.c ,new-file.c
   tla undo
   mv ,new-file.c new-file.c
   tla commit ...
   tla redo

which of course gets progressively more annoying if you have more than one
new file.  Even worse, I find it's actually fairly to want to commit both a
new file and a change to an existing file, and I'm not sure _how_ you'd
handle that case with `undo'.

Using undo for this case would be more tractable if undo itself permitted
limits (and my personal favorite, limited excludes: undo everything _except_
files x,y,z) -- including added/removed files.

Of course, none of these problems occur if people would just think ahead and
plan all their commits and changes -- but we're dealing with the real world
here, and people are people, and in fact commands to deal with this sort of
circustance are rather important (my complaints aside, undo is a huge help).

-Miles
-- 
Next to fried food, the South has suffered most from oratory.
                        -- Walter Hines Page




reply via email to

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