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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

>>> * 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;
 }




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux