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

Re: What's cooking in git.git (May 2024, #02; Fri, 3)

From
Junio C Hamano <gitster@pobox.com>
Date
May 7, 2024, 06:05 UTC
Message-ID
<xmqqh6fatawj.fsf@gitster.g>
In-Reply-To
<xmqqy18mwpog.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 8 quoted lines
>>> * ps/undecided-is-not-necessarily-sha1 (2024-04-30) 13 commits
>>> ...
>> Interesting, I couldn't reproduce this issue when rebasing the patches
>> onto "seen". There were merge conflicts though, both with
>> jc/no-default-attr-tree-in-bare and ps/the-index-is-no-more. So maybe
>> there was a mismerge involved somewhere?
>
> That is very possible.

Yeah, I think I botched the merge. Somehow my resolution had an unneeded "|| !is_null_oid()" in the result, but the right resolution of course should look like below.

Thanks.
diff --git c/attr.c w/attr.c
index 3afd477380..f3dd2de12d 100644
--- c/attr.c
+++ w/attr.c
@@ -1214,53 +1214,31 @@ void set_git_attr_source(const char *tree_object_name)
 static int compute_default_attr_source(struct object_id *attr_source)
 {
 	int ignore_bad_attr_tree = 0;
 
 	if (!default_attr_source_tree_object_name)
 		default_attr_source_tree_object_name = getenv(GIT_ATTR_SOURCE_ENVIRONMENT);
 
 	if (!default_attr_source_tree_object_name && git_attr_tree) {
 		default_attr_source_tree_object_name = git_attr_tree;
 		ignore_bad_attr_tree = 1;
 	}
 
-<<<<<<< HEAD
-	if (!default_attr_source_tree_object_name || !is_null_oid(attr_source))
-		return;
-||||||| 00e10ef10e
-	if (!default_attr_source_tree_object_name &&
-	    startup_info->have_repository &&
-	    is_bare_repository()) {
-		default_attr_source_tree_object_name = "HEAD";
-		ignore_bad_attr_tree = 1;
-	}
-
-	if (!default_attr_source_tree_object_name || !is_null_oid(attr_source))
-		return;
-=======
-	if (!default_attr_source_tree_object_name &&
-	    startup_info->have_repository &&
-	    is_bare_repository()) {
-		default_attr_source_tree_object_name = "HEAD";
-		ignore_bad_attr_tree = 1;
-	}
-
 	if (!default_attr_source_tree_object_name)
 		return 0;
 
 	if (!startup_info->have_repository) {
 		if (!ignore_bad_attr_tree)
 			die(_("cannot use --attr-source or GIT_ATTR_SOURCE without repo"));
 		return 0;
 	}
->>>>>>> ps/undecided-is-not-necessarily-sha1@{1}
 
 	if (repo_get_oid_treeish(the_repository,
 				 default_attr_source_tree_object_name,
 				 attr_source)) {
 		if (!ignore_bad_attr_tree)
 			die(_("bad --attr-source or GIT_ATTR_SOURCE"));
 		return 0;
 	}
 
 	return 1;
 }
Previous: Junio C HamanoNext: Patrick Steinhardt
Message 6 of 7 in “What's cooking in git.git (May 2024, #02; Fri, 3)”
  1. Junio C HamanoMay 4, 2024
  2. Dragan SimicMay 4, 2024
  3. ds/scalar-reconfigure-all-fix, was Re: What's cooking in git.git (May 2024, #02; Fri, 3)Johannes Schindelin, May 4, 2024
  4. Patrick SteinhardtMay 6, 2024
  5. Junio C HamanoMay 6, 2024
  6. Junio C HamanoMay 7, 2024
  7. Patrick SteinhardtMay 7, 2024

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.