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 johannes.schinde...@gmx.de wrote: @@ -227,6 +277,10 @@ static int report(struct fsck_options *options, struct object *object, if (msg_type == FSCK_IGNORE)

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 johannes.schinde...@gmx.de 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 Johannes Schindelin
Hi Junio, On 2015-06-19 22:39, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: +if (strcmp(var, receive.fsck.skiplist) == 0) { +const char *path = is_absolute_path(value) ? +value : git_path(%s, value); This either absolute

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

2015-06-20 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de 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

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

2015-06-19 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de 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.

[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