Files
git/builtin
Jeff King b861e235bc repack: propagate pack-objects options as strings
In the original shell version of git-repack, any options
destined for pack-objects were left as strings, and passed
as a whole. Since the C rewrite in commit a1bbc6c (repack:
rewrite the shell script in C, 2013-09-15), we now parse
these values to integers internally, then reformat the
integers when passing the option to pack-objects.

This has the advantage that we catch format errors earlier
(i.e., when repack is invoked, rather than when pack-objects
is invoked).

It has three disadvantages, though:

  1. Our internal data types may not be the right size. In
     the case of "--window-memory" and "--max-pack-size",
     these are "unsigned long" in pack-objects, but we can
     only represent a regular "int".

  2. Our parsing routines might not be the same as those of
     pack-objects. For the two options above, pack-objects
     understands "100m" to mean "100 megabytes", but repack
     does not.

  3. We have to keep a sentinel value to know whether it is
     worth passing the option along. In the case of
     "--window-memory", we currently do not pass it if the
     value is "0". But that is a meaningful value to
     pack-objects, where it overrides any configured value.

We can fix all of these by simply passing the strings from
the user along to pack-objects verbatim. This does not
actually fix anything for "--depth" or "--window", but these
are converted, too, for consistency.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-23 10:34:53 -08:00
..
2013-07-22 11:23:10 -07:00
2013-07-22 11:34:25 -07:00
2013-06-02 16:00:44 -07:00
2013-04-15 11:04:44 -07:00
2012-09-17 15:59:34 -07:00
2013-05-29 14:23:40 -07:00
2013-08-01 11:52:37 -07:00
2013-07-22 11:24:09 -07:00
2013-07-29 12:32:25 -07:00
2013-06-14 08:46:14 -07:00
2012-09-27 17:57:26 -07:00
2013-07-22 11:24:11 -07:00
2013-07-22 11:24:11 -07:00
2012-10-25 06:42:27 -04:00
2013-07-29 12:32:25 -07:00
2013-05-29 14:23:04 -07:00
2013-06-17 13:30:01 -07:00
2013-07-19 09:26:15 -07:00
2013-07-22 11:23:56 -07:00
2013-01-16 12:48:22 -08:00