Re: [PATCH v3* 11/33] commit.c: add repo_get_commit_tree()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 15, 2019, 13:20 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1904151518530.44@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20190413101600.713-1-pclouds@gmail.com>
Hi Duy,
On Sat, 13 Apr 2019, Nguyễn Thái Ngọc Duy wrote:
Show 13 quoted lines
> 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 commit *);
>
> +static inline void set_commit_tree(struct commit *c, struct tree *t)
> +{
> + c->maybe_tree = t;
> +}
> +
> /*I head *really* hoped that we could keep this function file-local, i.e. `static` *inside* the relevant file(s). Kind of making this a "private" or "protected" function, if you know what I mean.
Ciao, Johannes