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

Re: [PATCH] repack: rewrite the shell script in C.

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:58:25

Possibly related (same subject, not in this thread)

Stefan Beller [off-list ref] writes:
This is the beginning of the rewrite of the repacking.
(please, mark your patch as RFC/PATCH in the subject in this case)

A few quick comments on style below.
 Makefile                       |   2 +-
 builtin.h                      |   1 +
 builtin/repack.c               | 313 +++++++++++++++++++++++++++++++++++++++++
 contrib/examples/git-repack.sh | 194 +++++++++++++++++++++++++
 git-repack.sh                  | 194 -------------------------
 git.c                          |   1 +
I suggested that you first enrich the test suite if needed. Did you
check that the testsuite had good enough coverage for git-repack?
+static const char * const git_repack_usage[] = {
Style: no space after *.
+static int delta_base_offset = 1; // enabled by default since 22c79eab (2008-06-25)
No // comments please (they're C99, not portable C90).
+int cmd_repack(int argc, const char **argv, const char *prefix) {
Brace on the next line.
+	fname = xmalloc(strlen(packdir) + 47); // 40 chars for the sha1
+	fname_old = xmalloc(strlen(packdir) + 52); // 40 chars for the sha1
I'd rather have "40 + strlen("whatever")" explicitly.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help