Re: [PATCH] bundle, fast-import: detect write failure

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: Jim Meyering <jim@...>, Johannes Schindelin <Johannes.Schindelin@...>, git list <git@...>
Date: Friday, January 11, 2008 - 5:37 am

On Jan 11, 2008 7:36 AM, Junio C Hamano <gitster@pobox.com> wrote:

On a slightly related note: I've got a patch that handles the issue
that I reported a couple of months back that tmp pack/index objects
where a write fails partway through are not deleted by any git
processing, ie, when for example during git gc --prune we get

fatal: sha1 file '/media/usbdiskc/v.git/objects/tmp_pack_QCYYAi' write
error (No space left on device)
error: failed to run repack

but the tmp_pack_* isn't deleted. I put my patch on the back burner
when Junio declared a moratorium on new behaviours until after 1.5.4
gets released, but will post once things open up again.

As it relates to this discussion: one of the awkward things is that
the die stuff doesn't leave any programatic indication (ie, not just a
message to stderr) that a file is malformed due to a writing failure.
Per Nicolas Pitre's suggestion to delete failed tmp_ files during a
"git gc --prune", I just delete ALL tmp_ files at that time. This
approach seems a bit risky -- can something like a git-svn fetch which
generated tmp_ files by a different route be going on at the same time
as a git gc? -- but I couldn't think of another way to do it.

-- 
cheers, dave tweed__________________________
david.tweed@gmail.com
Rm 124, School of Systems Engineering, University of Reading.
"we had no idea that when we added templates we were adding a Turing-
complete compile-time language." -- C++ standardisation committee
-
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:
[PATCH] bundle, fast-import: detect write failure, Jim Meyering, (Thu Jan 10, 4:54 am)
Re: [PATCH] bundle, fast-import: detect write failure, Johannes Schindelin, (Thu Jan 10, 8:05 am)
Re: [PATCH] bundle, fast-import: detect write failure, Jim Meyering, (Thu Jan 10, 8:26 am)
Re: [PATCH] bundle, fast-import: detect write failure, Johannes Schindelin, (Thu Jan 10, 8:37 am)
Re: [PATCH] bundle, fast-import: detect write failure, Jim Meyering, (Thu Jan 10, 9:00 am)
Re: [PATCH] bundle, fast-import: detect write failure, Junio C Hamano, (Fri Jan 11, 3:36 am)
Re: [PATCH] bundle, fast-import: detect write failure, Johannes Schindelin, (Fri Jan 11, 7:39 am)
Re: [PATCH] bundle, fast-import: detect write failure, David Tweed, (Fri Jan 11, 5:37 am)
Re: [PATCH] bundle, fast-import: detect write failure, Pierre Habouzit, (Thu Jan 10, 12:25 pm)
Re: [PATCH] bundle, fast-import: detect write failure, Jim Meyering, (Thu Jan 10, 2:05 pm)
Re: [PATCH] bundle, fast-import: detect write failure, Pierre Habouzit, (Thu Jan 10, 2:18 pm)
Re: [PATCH] bundle, fast-import: detect write failure, Pierre Habouzit, (Thu Jan 10, 5:17 am)