Re: [PATCH v4 4/4] unbundle: introduce option VERIFY_BUNDLE_FSCK_FOLLOW_FETCH
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Jun 6, 2024, 12:06 UTC
- Message-ID
- <ZmGmV8-QNMN643ou@tanuki>
- In-Reply-To
- <68b9bca9f8b19897997c2adc9a278ac5052e75cd.1717057290.git.gitgitgadget@gmail.com>
On Thu, May 30, 2024 at 08:21:30AM +0000, Xing Xin via GitGitGadget wrote:
> From: Xing Xin <xingxin.xx@bytedance.com>
Same here, the important part is not that we introduce the flag, but that we start using it in `unbundle_from_file()`.
Show 13 quoted lines
> diff --git a/bundle-uri.c b/bundle-uri.c > index 066ff788104..e7ebac6ce57 100644 > --- a/bundle-uri.c > +++ b/bundle-uri.c > @@ -373,7 +373,7 @@ static int unbundle_from_file(struct repository *r, const char *file) > * the prerequisite commits. > */ > if ((result = unbundle(r, &header, bundle_fd, NULL, > - VERIFY_BUNDLE_QUIET | VERIFY_BUNDLE_FSCK_ALWAYS))) > + VERIFY_BUNDLE_QUIET | VERIFY_BUNDLE_FSCK_FOLLOW_FETCH))) > return 1; > > /*
One thing that is a bit weird is that we first change `unbundle()` to use `FSCK_ALWAYS` in a preceding patch, and then convert it to use `FSCK_FOLLOW_FETCH` in the same series. It could be restructured a bit to first introduce the flags, only, while not modifying any of the callsites yet. Passing the respective flags would then be done in a separate commit.
Patrick