Re: [PATCH v4 15/16] bisect: remove Cogito-related code
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 27, 2022, 22:18 UTC
- Message-ID
- <xmqqo7ydn42a.fsf@gitster.g>
- In-Reply-To
- <33566b86d77dcc11d68b2aceec0b6c5218bf198e.1656354677.git.gitgitgadget@gmail.com>
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 5 quoted lines
> As of April 19th, 2007, Cogito was therefore discontinued (see > https://lore.kernel.org/git/20070419124648.GL4489@pasky.or.cz/). > > Nevertheless, for almost 15 years after that announcement, Git carried > special code in `git bisect` to accommodate Cogito.
Good eyes. Doesn't steps 15 & 16 cover the same theme, though? IOW, if surviving Cogito users appear after we take this 16-patch series, would reverting this step the only thing needed if we decide to accomodate them again (and removal of head-name done in step 16 can still be kept without harming these Cogito users)? I am wondering if these should be merged into one patch.
Thanks.
Show 8 quoted lines
> > Since it is beyond doubt that there are no more Cogito users, let's > remove the last remnant of Cogito-accommodating code. > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> > --- > builtin/bisect.c | 8 -------- > 1 file changed, 8 deletions(-)
Show 27 quoted lines
>
> diff --git a/builtin/bisect.c b/builtin/bisect.c
> index 380fef852f3..47103ebf3f2 100644
> --- a/builtin/bisect.c
> +++ b/builtin/bisect.c
> @@ -14,7 +14,6 @@ static GIT_PATH_FUNC(git_path_bisect_expected_rev, "BISECT_EXPECTED_REV")
> static GIT_PATH_FUNC(git_path_bisect_ancestors_ok, "BISECT_ANCESTORS_OK")
> static GIT_PATH_FUNC(git_path_bisect_start, "BISECT_START")
> static GIT_PATH_FUNC(git_path_bisect_log, "BISECT_LOG")
> -static GIT_PATH_FUNC(git_path_head_name, "head-name")
> static GIT_PATH_FUNC(git_path_bisect_names, "BISECT_NAMES")
> static GIT_PATH_FUNC(git_path_bisect_first_parent, "BISECT_FIRST_PARENT")
> static GIT_PATH_FUNC(git_path_bisect_run, "BISECT_RUN")
> @@ -809,13 +808,6 @@ static enum bisect_error bisect_start(struct bisect_terms *terms, const char **a
> strbuf_addstr(&start_head, oid_to_hex(&head_oid));
> } else if (!get_oid(head, &head_oid) &&
> skip_prefix(head, "refs/heads/", &head)) {
> - /*
> - * This error message should only be triggered by
> - * cogito usage, and cogito users should understand
> - * it relates to cg-seek.
> - */
> - if (!is_empty_or_missing_file(git_path_head_name()))
> - return error(_("won't bisect on cg-seek'ed tree"));
> strbuf_addstr(&start_head, head);
> } else {
> return error(_("bad HEAD - strange symbolic ref"));