Skip to content

Commit

Permalink
Merge branch 'mk/maint-parse-careful'
Browse files Browse the repository at this point in the history
* mk/maint-parse-careful:
  receive-pack: use strict mode for unpacking objects
  index-pack: introduce checking mode
  unpack-objects: prevent writing of inconsistent objects
  unpack-object: cache for non written objects
  add common fsck error printing function
  builtin-fsck: move common object checking code to fsck.c
  builtin-fsck: reports missing parent commits
  Remove unused object-ref code
  builtin-fsck: move away from object-refs to fsck_walk
  add generic, type aware object chain walker

Conflicts:

	Makefile
	builtin-fsck.c
  • Loading branch information
Junio C Hamano committed Mar 2, 2008
2 parents c42f636 + 28f72a0 commit eadbcd4
Show file tree
Hide file tree
Showing 22 changed files with 725 additions and 427 deletions.
6 changes: 6 additions & 0 deletions Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
The default value is true.

receive.unpackLimit::
If the number of objects received in a push is below this
limit then the objects will be unpacked into loose object
Expand Down
3 changes: 3 additions & 0 deletions Documentation/git-index-pack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ OPTIONS
to force the version for the generated pack index, and to force
64-bit index entries on objects located above the given offset.

--strict::
Die, if the pack contains broken objects or links.


Note
----
Expand Down
3 changes: 3 additions & 0 deletions Documentation/git-unpack-objects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
------
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ LIB_H = \
run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h \
tree-walk.h log-tree.h dir.h path-list.h unpack-trees.h builtin.h \
utf8.h reflog-walk.h patch-ids.h attr.h decorate.h progress.h \
mailmap.h remote.h parse-options.h transport.h diffcore.h hash.h
mailmap.h remote.h parse-options.h transport.h diffcore.h hash.h fsck.h

DIFF_OBJS = \
diff.o diff-lib.o diffcore-break.o diffcore-order.o \
Expand All @@ -319,7 +319,7 @@ LIB_OBJS = \
patch-ids.o \
object.o pack-check.o pack-write.o patch-delta.o path.o pkt-line.o \
sideband.o reachable.o reflog-walk.o \
quote.o read-cache.o refs.o run-command.o dir.o object-refs.o \
quote.o read-cache.o refs.o run-command.o dir.o \
server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \
tag.o tree.o usage.o config.o environment.o ctype.o copy.o \
revision.o pager.o tree-walk.o xdiff-interface.o \
Expand All @@ -328,7 +328,7 @@ LIB_OBJS = \
color.o wt-status.o archive-zip.o archive-tar.o shallow.o utf8.o \
convert.o attr.o decorate.o progress.o mailmap.o symlinks.o remote.o \
transport.o bundle.o walker.o parse-options.o ws.o archive.o branch.o \
alias.o
alias.o fsck.o

BUILTIN_OBJS = \
builtin-add.o \
Expand Down
1 change: 0 additions & 1 deletion builtin-fetch-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ static int everything_local(struct ref **refs, int nr_match, char **match)
int retval;
unsigned long cutoff = 0;

track_object_refs = 0;
save_commit_buffer = 0;

for (ref = *refs; ref; ref = ref->next) {
Expand Down
Loading

0 comments on commit eadbcd4

Please sign in to comment.