From: "Jon Smirl" <jonsmirl@gmail.com>
To: "Nicolas Pitre" <nico@cam.org>
Cc: Sean <seanlkml@sympatico.ca>,
"Junio C Hamano" <gitster@pobox.com>,
"Git Mailing List" <git@vger.kernel.org>
Subject: Re: Rollback of git commands
Date: Wed, 28 Nov 2007 12:03:28 -0500 [thread overview]
Message-ID: <9e4733910711280903w26e9821ah17db9ad468dea460@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.0.99999.0711281141150.9605@xanadu.home>
On 11/28/07, Nicolas Pitre <nico@cam.org> wrote:
> On Wed, 28 Nov 2007, Jon Smirl wrote:
>
> > On 11/28/07, Nicolas Pitre <nico@cam.org> wrote:
> > > On Wed, 28 Nov 2007, Jon Smirl wrote:
> > >
> > > > On 11/28/07, Nicolas Pitre <nico@cam.org> wrote:
> > > > > On Tue, 27 Nov 2007, Jon Smirl wrote:
> > > > >
> > > > > > Of course you've never screwed up a repository using git commands,
> > > > > > right? I've messed up plenty. A good way to mess up a repo is to get
> > > > > > the data in .git/* out of sync with what is in the repo. I'm getting
> > > > > > good enough with git that I can fix most mess up with a few edits, but
> > > > > > it took me two years to get to that point. Rolling back to a check
> > > > > > point is way easier. User error and a command failing are both equally
> > > > > > valid ways to mess up a repo.
> > > > >
> > > > > The reflog contains all your check points, for every modifications you
> > > > > make, even the stupid ones. You should look at it.
> > > >
> > > > The state contained in the other config files in .git/* is not getting
> > > > check pointed. I can use reflog to move my branch heads around. But
> > > > doing that does not undo the changes to the state recorded in .git/*.
> > > > After the error I encountered I moved my branch head back, but the
> > > > state stgit had stored in .git/* was out of sync with where the branch
> > > > had been moved to.
> > >
> > > It's up to stgit to version control its state then. It may even use a
> > > reflog for it. All the machinery is there already.
> >
> > Git has state in .git/* too, shouldn't it be version controlling it
> > too? If git was version controlling the state in .git/* you'd have
> > checkpoints with the ability to roll back.
>
> Well, the .git directory contains data to identify what is actually
> version controlled. If you start versioning the data used to implement
> the versioning, don't you get into endless recursion here?
You would end up with a single non-version controlled sha pointer that
would need to be stored externally. That pointer would be the
beginning of the rollback log. It's just a normal commit chain.
In a totally version controlled system. .git/* would only contain
objects and the one pointer to the current state of the system.
--
Jon Smirl
jonsmirl@gmail.com
next prev parent reply other threads:[~2007-11-28 17:03 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 23:23 Rollback of git commands Jon Smirl
2007-11-28 0:51 ` Junio C Hamano
2007-11-28 1:33 ` Jon Smirl
2007-11-28 1:49 ` Jon Smirl
2007-11-28 1:57 ` David Symonds
2007-11-28 16:50 ` Ingo Molnar
2007-11-28 18:39 ` Sergei Organov
2007-11-28 18:52 ` Nicolas Pitre
2007-11-28 4:07 ` Geert Bosch
2007-11-28 16:20 ` Jeff King
2007-11-28 16:23 ` Jon Smirl
2007-11-28 16:28 ` Jeff King
2007-11-28 3:55 ` Sean
2007-11-28 4:37 ` Jon Smirl
2007-11-28 4:40 ` Sean
2007-11-28 4:53 ` Jon Smirl
2007-11-28 14:53 ` Nicolas Pitre
2007-11-28 15:58 ` Jon Smirl
2007-11-28 16:26 ` Nicolas Pitre
2007-11-28 16:37 ` Jon Smirl
2007-11-28 16:46 ` Nicolas Pitre
2007-11-28 17:03 ` Jon Smirl [this message]
2007-11-29 8:42 ` Karl Hasselström
2007-11-28 4:57 ` Junio C Hamano
2007-11-28 9:22 ` Karl Hasselström
2007-11-28 15:13 ` Jon Smirl
2007-11-28 21:47 ` Daniel Barkalow
2007-11-28 21:58 ` Steven Grimm
2007-11-28 22:48 ` Daniel Barkalow
2007-11-28 23:42 ` Jon Smirl
2007-11-29 8:28 ` Theodore Tso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9e4733910711280903w26e9821ah17db9ad468dea460@mail.gmail.com \
--to=jonsmirl@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nico@cam.org \
--cc=seanlkml@sympatico.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).