Re: [PATCH v2 2/2] blame: ignore revs in HEAD:.git-blame-ignore-revs
- From
- Ravi Mistry <rmistry@google.com>
- Date
- Oct 12, 2026, 19:21 UTC
- Message-ID
- <20261012192157.1835972-1-rmistry@google.com>
- In-Reply-To
- <xmqqbj8yan77.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 14 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> writes: > > > I've left a couple of comments on v3. Ignoring uncommitted changes in > > the file in the working tree seems a bit odd to me and we seem to be > > prepared to load a file of any size from an untrusted source. > > The latter sounds like a sensible thing to worry about. Thanks for > bringing it up. > > I do not have strong opinions either way on the former myself (the > behaviour implemented is to attempt matching what the hosting sites > do, which obviously work from the committed copy). It indeed feels > more intuitive if the checked out copy (or even the file before it > gets added for the first time) were consulted.
I have sent v4, which caps the size of the default HEAD:.git-blame-ignore-revs blob at 100MB (matching ATTR_MAX_FILE_SIZE from 3c50032ff5 ("attr: ignore overly large gitattributes files", 2022-12-01)) so an oversized blob is skipped with a warning without being loaded into memory.
For v4, I left the behavior as reading from HEAD:.git-blame-ignore-revs to match hosting sites for now. Maybe consulting the working tree could be explored in the future in a separate series if desired, or please let me know if you or Phillip would prefer to change it in this series.
Thanks!