Re: [PATCH v12 3/8] object-file.c: refactor write_loose_object() to several steps
- From
- Han Xin <chiyutianyi@gmail.com>
- Date
- Mar 30, 2022, 07:13 UTC
- Message-ID
- <20220330071344.25676-1-chiyutianyi@gmail.com>
- In-Reply-To
- <patch-v12-3.8-3dcaa5d6589-20220329T135446Z-avarab@gmail.com>
On Tue, Mar 29, 2022 at 3:56 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 7 quoted lines
> > +/** > + * Common steps for loose object writers to end writing loose objects: > + * > + * - End the compression of zlib stream. > + * - Get the calculated oid to "oid". > + * - fsync() and close() the "fd"
Since we removed close_loose_object() from end_loose_object_common() , I think this comment should also be removed.
Thanks. -Han Xin
Show 14 quoted lines
> + */
> +static int end_loose_object_common(git_hash_ctx *c, git_zstream *stream,
> + struct object_id *oid)
> +{
> + int ret;
> +
> + ret = git_deflate_end_gently(stream);
> + if (ret != Z_OK)
> + return ret;
> + the_hash_algo->final_oid_fn(oid, c);
> +
> + return Z_OK;
> +}
> +