From b41860bf28a16ad6015eb0c55dc95602f1235640 Mon Sep 17 00:00:00 2001 From: Martin Koegler Date: Mon, 25 Feb 2008 22:46:11 +0100 Subject: unpack-objects: prevent writing of inconsistent objects This patch introduces a strict mode, which ensures that: - no malformed object will be written - no object with broken links will be written The patch ensures this by delaying the write of all non blob object. These object are written, after all objects they link to are written. An error can only result in unreferenced objects. Signed-off-by: Martin Koegler Signed-off-by: Junio C Hamano --- Documentation/git-unpack-objects.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-unpack-objects.txt b/Documentation/git-unpack-objects.txt index b79be3fd4c..3697896a06 100644 --- a/Documentation/git-unpack-objects.txt +++ b/Documentation/git-unpack-objects.txt @@ -40,6 +40,9 @@ OPTIONS and make the best effort to recover as many objects as possible. +--strict:: + Don't write objects with broken content or links. + Author ------ -- cgit v1.2.1 From 20dc0016eebdfabbbffe8fc98364fed855ce59a4 Mon Sep 17 00:00:00 2001 From: Martin Koegler Date: Mon, 25 Feb 2008 22:46:13 +0100 Subject: receive-pack: allow using --strict mode for unpacking objects When a configuration variable receive.fsckobjects is set, receive-pack runs unpack-objects with --strict mode to check all received objects. Signed-off-by: Martin Koegler Signed-off-by: Junio C Hamano --- Documentation/config.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation') diff --git a/Documentation/config.txt b/Documentation/config.txt index 4027726f2e..74a092c5e8 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -939,6 +939,12 @@ imap:: The configuration variables in the 'imap' section are described in linkgit:git-imap-send[1]. +receive.fsckObjects:: + If it is set to true, git-receive-pack will check all received + objects. It will abort in the case of a malformed object or a + broken link. The result of an abort are only dangling objects. + Defaults to false. + receive.unpackLimit:: If the number of objects received in a push is below this limit then the objects will be unpacked into loose object -- cgit v1.2.1