On Sat, 13 Oct 2012 09:27:38 -0400
Richard Hipp <d...@sqlite.org> wrote:

> On Sat, Oct 13, 2012 at 4:06 AM, Gour <g...@atmarama.net> wrote:
> > Now, I'm curious about some of the items from the TODO list
> > (http://www.fossil-scm.org/index.html/wiki?name=To+Do+List)
> > and their status:
> >
> > * Uncommit
> > All what I need is simple mechanism to quickly 'fix' some wrong commits
> > without tinkering deep into the commit history.
> Deleting content from a repository is scary.  A bug in the delete logic
> could easily cause loss of information.

[excellent explanation elided]

> Hence, I am reluctant implement uncommit on a repository.
> [...]
> Brainstorm:  A potential work-around

How about a second one?

Uncommit limited to the last commit, for the 'oops' commits where your
fingers got ahead of your brains, or you realized seconds after making
it that one of the globs included files you didn't commit, and so
on. This is about the only kind of uncommit I ever want.

The repo would keep track of the last commit, and allow it to be
removed. Any non-commit commands that made removing it dangerous would
NULL that out, so you could no longer remove it.

Syncing remote repositories makes removes interesting. I believe that
the git tutorials recommend not removing any commit that's been
pushed, because - well, it just screws things up. I think this limited
version might be made safe:

- uncommit after a push is ok
- syncing a removal only works if the commit is removable on the
  receiving repo.
- failing to sync a removal is a warning, but doesn't stop the rest of
  the sync. In this case, the removed commit eventually comes back
  everywhere.

On the other hand, you could make push clear the removable commit, and
have uncommit simply not available if autosync is on. I suspect you
want that for most forms of uncommit in any case. Your proposed workaround
has similar issues.

     <mike
-- 
Mike Meyer <m...@mired.org>             http://www.mired.org/
Independent Software developer/SCM consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to