Re: [RFC Patch] Preventing corrupt objects from entering the repository

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: <git@...>
Date: Tuesday, February 12, 2008 - 3:20 am

On Sun, Feb 10, 2008 at 04:00:44PM -0800, Junio C Hamano wrote:

Not very much. In patch 11, we would not need to parse a config
variable and could pass --strict option unconditional to
index-pack/unpack-objects.

For the moment, I would like to keep it as an option (enabled by
default). If somebody has a repository with a totally broken history,
he would not be able to push any more, if there is no way to disable
it.


This code is only used by unpack-objects, which is used for small
packs. It only caches metadata (tree,commit,tag), no blobs. So the
memory usage should not be a problem.


Will try to restructure the patches.


In mark_objects, I don't care for the results. Its should only
mark all reachable objects (without crashing).


The tree is traversed multiple times:
* to mark reachable objects
* to mark it's childs used
* to check for broken links

The last use of the tree content is, after all objects are already in
memory.


Will change.


If eg. the sha1 of a commit is stored as tree in a commit, you will
find a null pointer in struct commit->tree. Such things will hit this
check.


I'll merge this patch with the next patch.


The free is the task of write_object. If (!strict), then it is freeed
immediatly. Similar for blobs. Other objects are put in the cache (see
patch 1).


Will fix.


This is, because the new field in obj_list must be initialized with
zero.

mfg martin Kögler
-
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: [RFC Patch] Preventing corrupt objects from entering the..., Martin Koegler, (Tue Feb 12, 3:20 am)
Re: [RFC Patch] Preventing corrupt objects from entering the..., Johannes Schindelin, (Wed Feb 13, 8:01 am)
Re: [RFC Patch] Preventing corrupt objects from entering the..., Johannes Schindelin, (Thu Feb 14, 8:06 pm)
[RFC PATCH] Remove object-refs from fsck, Shawn O. Pearce, (Thu Feb 14, 5:00 am)
Re: [RFC PATCH] Remove object-refs from fsck, Martin Koegler, (Thu Feb 14, 3:07 pm)