Re: Hey - A Conceptual Simplication....
- From
Dmitry Potapov <dpotapov@gmail.com>
- Date
- Nov 20, 2009, 03:08 UTC
- Message-ID
- <20091120030801.GE22556@dpotapov.dyndns.org>
- In-Reply-To
- <20091120023540.GA17796@atjola.homenet>
On Fri, Nov 20, 2009 at 03:35:40AM +0100, Björn Steinbrink wrote:
Show 14 quoted lines
> On 2009.11.20 04:48:44 +0300, Dmitry Potapov wrote: > > On Wed, Nov 18, 2009 at 09:03:31PM -0500, George Dennie wrote: > > > > > > For example, the functional notion of the repository seems well > > > defined: a growing web of immutable commits each created as either an > > > isolated commit or more typically an update and/or merger of one or > > > more pre-existing commits. > > > > In Git, commits are not immutable. > > Commit _are_ immutable. Like all git objects (blob, tree, commits, tag). > "Rewriting" history actually means creating a new history (adding > objects), and then changing a ref (most often a branch head) to > reference the new instead of the old history.
I stand corrected. All objects in Git repository are actually immutable, but because references can be changed (and tools like git-rebase change it automatically), it _appears_ like editing existing commits, but in fact old commits do not disappear immediately. Even if there is no other branches or tags that refer to old commits, git-reflog stores references to them for 30 days after that the garbage collector can remove them.
Dmitry