login
Header Space

 
 

Re: git gc & deleted branches

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Shawn O. Pearce <spearce@...>
Cc: Junio C Hamano <gitster@...>, Nicolas Pitre <nico@...>, Brandon Casey <casey@...>, Geert Bosch <bosch@...>, Jeff King <peff@...>, <git@...>
Date: Friday, May 9, 2008 - 8:43 pm

"Shawn O. Pearce" <spearce@spearce.org> writes:



It doesn't seem all that complex, and I'd say that fundamentally it is
the _correct_ way to do things.  Being sloppy is always easier in the
short run, but then either means the system is permanently broken or
results in a lot of "fixing up" work later.  I think almost all of the
work of handling these log files could be done without impacting a lot
of code that calls the relevant APIs that would actually use the log
files.  I think the biggest impact would be on non-C code, but even for
that code, appropriate wrapper could be used to avoid having to make
many changes.


This sort of reasoning just leads to an inherently unreliable system.
Sure, two weeks might seem good enough for nearly all cases, but why
_shouldn't_ I be able to leave my editor open for two weeks before
typing in my commit message and finishing the commit, or wait for two
weeks in the middle of a rebase (it seems that in the new
implementation, temporary refs are created basically to do the same
thing as the log file I described.)  I could easily be typing up my
commit message, then switch to something else, and happen not to come
back to it for two weeks.

Because such a "timeout" based solution isn't really the "correct
solution" but will work most of the time, potential problems won't be
noticed while testing.

Another significant issue is that this timeout means that unreferenced
junk has to stay around in the repository for two weeks for no (good)
reason.



First of all, merely exiting due to an error should not cause log files
to be left around.  The only thing that should cause log files to be
left around is kill -9 or a system crash.  Second, by storing the
process id and a timestamp of when the log file was created, it is
possible to reliably determine if a log file is stale.

-- 
Jeremy Maitin-Shepard
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: git gc &amp; deleted branches, Brandon Casey, (Thu May 8, 9:41 pm)
Re: git gc &amp; deleted branches, Jeff King, (Fri May 9, 12:19 am)
Re: git gc &amp; deleted branches, Geert Bosch, (Fri May 9, 11:00 am)
Re: git gc &amp; deleted branches, Brandon Casey, (Fri May 9, 11:14 am)
Re: git gc &amp; deleted branches, Nicolas Pitre, (Fri May 9, 12:12 pm)
Re: git gc &amp; deleted branches, Junio C Hamano, (Fri May 9, 6:33 pm)
Re: git gc &amp; deleted branches, Jeremy Maitin-Shepard, (Fri May 9, 8:07 pm)
Re: git gc &amp; deleted branches, Shawn O. Pearce, (Fri May 9, 8:20 pm)
Re: git gc &amp; deleted branches, Junio C Hamano, (Fri May 9, 9:21 pm)
Re: git gc &amp; deleted branches, Jeremy Maitin-Shepard, (Fri May 9, 9:51 pm)
Re: git gc &amp; deleted branches, Jeff King, (Sat May 10, 1:25 am)
Re: git gc &amp; deleted branches, Jeremy Maitin-Shepard, (Sat May 10, 1:36 am)
Re: git gc &amp; deleted branches, Johannes Schindelin, (Sat May 10, 5:04 am)
Re: git gc &amp; deleted branches, Jeremy Maitin-Shepard, (Sat May 10, 12:24 pm)
Re: git gc &amp; deleted branches, Johannes Schindelin, (Sun May 11, 7:11 am)
Re: git gc & deleted branches, Jeremy Maitin-Shepard, (Fri May 9, 8:43 pm)
Re: git gc &amp; deleted branches, Brandon Casey, (Fri May 9, 12:54 pm)
Re: git gc &amp; deleted branches, Jeff King, (Fri May 9, 11:53 am)
Re: git gc &amp; deleted branches, Brandon Casey, (Fri May 9, 11:56 am)
Re: git gc &amp; deleted branches, Junio C Hamano, (Thu May 8, 11:21 pm)
speck-geostationary