Re: [PATCH v3* 11/33] commit.c: add repo_get_commit_tree()

2019-04-15 Thread Johannes Schindelin
Hi Duy, On Sat, 13 Apr 2019, Nguyễn Thái Ngọc Duy wrote: > diff --git a/commit.h b/commit.h > index 42728c2906..7342727e46 100644 > --- a/commit.h > +++ b/commit.h > @@ -143,9 +143,15 @@ void repo_unuse_commit_buffer(struct repository *r, > struct object_id *get_commit_tree_oid(const struct comm

Re: [PATCH v3* 11/33] commit.c: add repo_get_commit_tree()

2019-04-13 Thread SZEDER Gábor
On Sat, Apr 13, 2019 at 05:16:00PM +0700, Nguyễn Thái Ngọc Duy wrote: > OK how about this? set_commit_tree() is added to keeps that long line > in commit.cocci down. I also make commit.cocci generate invalid > repo_get_commit_tree() code this time. > diff --git a/contrib/coccinelle/commit.cocci

[PATCH v3* 11/33] commit.c: add repo_get_commit_tree()

2019-04-13 Thread Nguyễn Thái Ngọc Duy
Remove the implicit dependency on the_repository in this function. It will be used in sha1-name.c functions when they are updated to take any 'struct repository'. get_commit_tree() remains as a compat wrapper, to be slowly replaced later. set_commit_tree() is added just to simplify the filtering i

[PATCH v3 11/33] commit.c: add repo_get_commit_tree()

2019-04-06 Thread Nguyễn Thái Ngọc Duy
Remove the implicit dependency on the_repository in this function. It will be used in sha1-name.c functions when they are updated to take any 'struct repository'. get_commit_tree() remains as a compat wrapper, to be slowly replaced later. Signed-off-by: Nguyễn Thái Ngọc Duy --- commit.c