On Mon, Jun 04, 2018 at 04:18:17PM +0200, SZEDER Gábor wrote:
>
> > * jk/index-pack-maint (2018-06-01) 2 commits
> > (merged to 'next' on 2018-06-04 at c553a485e8)
> > + index-pack: handle --strict checks of non-repo packs
> > + prepare_commit_graft: treat non-repository as a noop
> >
> > "index-pack --strict" has been taught to make sure that it runs the
> > final object integrity checks after making the freshly indexed
> > packfile available to itself.
> >
> > Will cook in 'next'.
>
> These patches can't be applied directly on top of v2.17.1, or there
> was a wrong merge conflict resolution, or I don't know. Anyway,
> building 368b4e5906 (index-pack: handle --strict checks of non-repo
> packs, 2018-05-31) results in:
>
> CC builtin/index-pack.o
> builtin/index-pack.c: In function ‘final’:
> builtin/index-pack.c:1487:23: warning: passing argument 1 of
> ‘install_packed_git’ from incompatible pointer type
> [-Wincompatible-pointer-types]
> install_packed_git(the_repository, p);
Oh, right, I did have to adapt for the "the_repository" bits added on
master.
The diff to apply it on maint is just:
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 7b399478dd..3030c88d38 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1484,7 +1484,7 @@ static void final(const char *final_pack_name, const char
*curr_pack_name,
struct packed_git *p;
p = add_packed_git(final_index_name, strlen(final_index_name),
0);
if (p)
- install_packed_git(the_repository, p);
+ install_packed_git(p);
}
if (!from_stdin) {
-Peff