From: Christian Couder Date: Sat, 13 Jun 2020 08:09:41 GMT Subject: Re: [RFC PATCH v1 1/6] stash: mark `i_tree' in reset_tree() const Message-ID: In-Reply-To: <20200505104849.13602-2-alban.gruin@gmail.com> On Tue, May 5, 2020 at 12:56 PM Alban Gruin wrote: > > As reset_tree() does not change the value pointed by `i_tree', and that > it will be provided with `the_hash_algo->empty_tree' which is a > constant, it is changed to be a pointer to a constant. [...] > -static int reset_tree(struct object_id *i_tree, int update, int reset) > +static int reset_tree(const struct object_id *i_tree, int update, int reset) Yeah, in rest_tree() it is only used like this: tree = parse_tree_indirect(i_tree); and parse_tree_indirect() takes a 'const struct object_id *'. > -- > 2.26.2 >