Re: [PATCH v6 18/19] fsck: git receive-pack: support excluding objects from fsck'ing

2015-06-22 Thread Johannes Schindelin
Hi Junio, On 2015-06-22 06:21, Junio C Hamano wrote: > On Fri, Jun 19, 2015 at 6:35 AM, Johannes Schindelin > wrote: >> >> @@ -227,6 +277,10 @@ static int report(struct fsck_options *options, struct >> object *object, >> if (msg_type == FSCK_IGNORE) >> return 0; >> >> +

Re: [PATCH v6 18/19] fsck: git receive-pack: support excluding objects from fsck'ing

2015-06-21 Thread Junio C Hamano
On Fri, Jun 19, 2015 at 6:35 AM, Johannes Schindelin wrote: > > @@ -227,6 +277,10 @@ static int report(struct fsck_options *options, struct > object *object, > if (msg_type == FSCK_IGNORE) > return 0; > > + if (options->skiplist && object && > +

Re: [PATCH v6 18/19] fsck: git receive-pack: support excluding objects from fsck'ing

2015-06-20 Thread Junio C Hamano
Johannes Schindelin writes: > There is a problem, though: `git_config_pathname()` accepts a > `const char **` parameter to set the path, yet I need to `free()` > that pointer afterwards because it has been obtained through > `expand_user_path()` which detaches that buffer from a `strbuf`. "I hav

Re: [PATCH v6 18/19] fsck: git receive-pack: support excluding objects from fsck'ing

2015-06-20 Thread Johannes Schindelin
Hi Junio, On 2015-06-19 22:39, Junio C Hamano wrote: > Johannes Schindelin writes: > >> +if (strcmp(var, "receive.fsck.skiplist") == 0) { >> +const char *path = is_absolute_path(value) ? >> +value : git_path("%s", value); > > This "either absolute or inside $

Re: [PATCH v6 18/19] fsck: git receive-pack: support excluding objects from fsck'ing

2015-06-19 Thread Junio C Hamano
Johannes Schindelin writes: > + if (strcmp(var, "receive.fsck.skiplist") == 0) { > + const char *path = is_absolute_path(value) ? > + value : git_path("%s", value); This "either absolute or inside $GIT_DIR" looks somewhat strange to me. Shouldn't we mimick wh

[PATCH v6 18/19] fsck: git receive-pack: support excluding objects from fsck'ing

2015-06-19 Thread Johannes Schindelin
The optional new config option `receive.fsck.skiplist` specifies the path to a file listing the names, i.e. SHA-1s, one per line, of objects that are to be ignored by `git receive-pack` when `receive.fsckObjects = true`. This is extremely handy in case of legacy repositories where it would cause m