Thread (21 messages) flat view 21 messages, 6 authors, 2016-08-14

Re: why is git destructive by default? (i suggest it not be!)

From: Jeff King <hidden>
Date: 2016-06-15 22:44:48

On Tue, Jun 24, 2008 at 07:31:31AM -0000, David Jeske wrote:
..are you saying that if I reset --hard, or delete a branch ref, or do a
rebase, and then do a GC beyond the GC timeout, that git will NEVER throw away
any of those DAGs? (the actual source diffs committed)
No. Git keeps the reachable DAG. So if the DAG is part of development
that is merged into one of your long running branches, or if you keep
around the branch that points to it, it will never go away.
My (possibly flawed) understanding was that it drops any DAG sections
that are not referenced by valid refs which are older than the GC
timeout.
Yes. So the way to "forget" about some history is to stop referencing
it. And then, after a grace period, it will be removed.
Are you saying this GC process will never collect source diffs in the
DAG?
No, but it will only remove unreferenced things. And things only become
unreferenced through explicit user action. So you don't have to worry
about git GCing your work unexpectedly. You do have to worry about git
GCing things you have explicitly told it to delete.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help