From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: What's cooking in git.git (May 2024, #02; Fri, 3)
Date: Mon, 06 May 2024 23:05:00 -0700 [thread overview]
Message-ID: <xmqqh6fatawj.fsf@gitster.g> (raw)
In-Reply-To: <xmqqy18mwpog.fsf@gitster.g> (Junio C. Hamano's message of "Mon, 06 May 2024 15:17:35 -0700")
Junio C Hamano <gitster@pobox.com> 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;
}
next prev parent reply other threads:[~2024-05-07 6:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-04 0:27 What's cooking in git.git (May 2024, #02; Fri, 3) Junio C Hamano
2024-05-04 2:59 ` Dragan Simic
2024-05-04 8:58 ` ds/scalar-reconfigure-all-fix, was " Johannes Schindelin
2024-05-06 9:21 ` Patrick Steinhardt
2024-05-06 22:17 ` Junio C Hamano
2024-05-07 6:05 ` Junio C Hamano [this message]
2024-05-07 6:15 ` Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqh6fatawj.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).