From: Harald Nordgren Date: Sat, 31 Oct 2026 08:10:07 GMT Subject: Re: [PATCH v5 4/4] branch: let --delete-integrated find branches merged onto changed files Message-ID: In-Reply-To: > > +static int merge_keeps_upstream(const struct branch_change *change) > > +{ > > + mmfile_t base, upstream, branch; > > + mmfile_t result = { 0 }; > > + int ret; > > + > > + read_mmblob(&base, the_repository->objects, &change->base_oid); > > + read_mmblob(&upstream, the_repository->objects, &change->upstream_oid); > > + read_mmblob(&branch, the_repository->objects, &change->branch_oid); > > + ret = ll_merge(&result, change->path, &base, "base", > > + &upstream, "upstream", &branch, "branch", > > + the_repository->index, NULL) == LL_MERGE_OK && > > + result.size == upstream.size && > > + !memcmp(result.ptr, upstream.ptr, upstream.size); > > + > > + free(base.ptr); > > + free(upstream.ptr); > > + free(branch.ptr); > > + free(result.ptr); > > + return ret; > > +} > > The function calls ll_merge() and passes the istate associated with > the_repository global, but have we read the index before the control > reaches this point? ll_merge() would want to consult custom low > level merge from the attribute subsystem, and with istate that is > not populated, it would fail to learn what the in-index attributes > say, no? > > If there is a reason why we want to ignore the attributes, perhaps > we should explicitly say so. I'll take a look. Harald