Thread (22 messages) flat view 22 messages, 6 authors, 2016-06-15

Re: [PATCH] drop support for "experimental" loose objects

From: Jeff King <hidden>
Date: 2016-06-15 22:59:18

On Thu, Nov 21, 2013 at 07:43:03PM +0700, Duy Nguyen wrote:
quoted
-       if (experimental_loose_object(map)) {
Perhaps keep this..
quoted
-               /*
-                * The old experimental format we no longer produce;
-                * we can still read it.
-                */
-               used = unpack_object_header_buffer(map, mapsize, &type, &size);
-               if (!used || !valid_loose_object_type[type])
-                       return -1;
-               map += used;
-               mapsize -= used;
-
-               /* Set up the stream for the rest.. */
-               stream->next_in = map;
-               stream->avail_in = mapsize;
-               git_inflate_init(stream);
-
-               /* And generate the fake traditional header */
-               stream->total_out = 1 + snprintf(buffer, bufsiz, "%s %lu",
-                                                typename(type), size);
-               return 0;
and replace all this with

die("detected an object in obsolete format, please repack the
repository using a version before XXX");
That would eliminate the second part of my purpose, which is to not
die() on a corrupted object because we incorrectly guess that it is
experimental.

If we think these objects are in the wild, the right thing to do would
be to warn() and continue. But I really find it hard to believe any such
objects exist at this point.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help