git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 5/6] bisect: remove Cogito-related code

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Dec 15, 2022, 09:47 UTC
Message-ID
<patch-5.6-1b70cd79cae-20221215T094038Z-avarab@gmail.com>
In-Reply-To
<cover-0.6-00000000000-20221215T094038Z-avarab@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

Once upon a time, there was this idea that Git would not actually be a single coherent program, but rather a set of low-level programs that users cobble together via shell scripts, or develop high-level user interfaces for Git, or both.

Cogito was such a high-level user interface, incidentally implemented via shell scripts that cobble together Git calls.

It did turn out relatively quickly that Git would much rather provide a useful high-level user interface itself.

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.

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>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/bisect.c | 8 --------
 1 file changed, 8 deletions(-)
diff --git a/builtin/bisect.c b/builtin/bisect.c
index 0786ebf4012..73017402671 100644
--- a/builtin/bisect.c
+++ b/builtin/bisect.c
@@ -15,7 +15,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")
@@ -808,13 +807,6 @@ static enum bisect_error bisect_start(struct bisect_terms *terms, int argc,
 			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"));
-- 
2.39.0.rc2.1048.g0e5493b8d5b
Previous: Đoàn Trần Công DanhNext: Ævar Arnfjörð Bjarmason
Message 7 of 16 in “bisect: follow-up fixes from js/bisect-in-c”
  1. 0/6 bisect: follow-up fixes from js/bisect-in-cÆvar Arnfjörð Bjarmason, Dec 15, 2022
  2. 1/6 bisect--helper: simplify exit code computationÆvar Arnfjörð Bjarmason, Dec 15, 2022
  3. 2/6 bisect--helper: make the order consistently `argc, argv`Ævar Arnfjörð Bjarmason, Dec 15, 2022
  4. 3/6 bisect: verify that a bogus option won't try to start a bisectionÆvar Arnfjörð Bjarmason, Dec 15, 2022
  5. 4/6 bisect run: fix the error messageÆvar Arnfjörð Bjarmason, Dec 15, 2022
  6. Đoàn Trần Công DanhDec 15, 2022
  7. 5/6 bisect: remove Cogito-related codeÆvar Arnfjörð Bjarmason, Dec 15, 2022
  8. 6/6 bisect: no longer try to clean up left-over `.git/head-name` filesÆvar Arnfjörð Bjarmason, Dec 15, 2022
  9. Christian CouderDec 15, 2022
  10. 0/6 bisect: follow-up fixes from js/bisect-in-cÆvar Arnfjörð Bjarmason, Jan 12, 2023
  11. 1/6 bisect--helper: simplify exit code computationÆvar Arnfjörð Bjarmason, Jan 12, 2023
  12. 2/6 bisect--helper: make the order consistently `argc, argv`Ævar Arnfjörð Bjarmason, Jan 12, 2023
  13. 3/6 bisect: verify that a bogus option won't try to start a bisectionÆvar Arnfjörð Bjarmason, Jan 12, 2023
  14. 5/6 bisect: remove Cogito-related codeÆvar Arnfjörð Bjarmason, Jan 12, 2023
  15. 6/6 bisect: no longer try to clean up left-over `.git/head-name` filesÆvar Arnfjörð Bjarmason, Jan 12, 2023
  16. 4/6 bisect run: fix the error messageÆvar Arnfjörð Bjarmason, Jan 12, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.