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

Re: [PATCH 1/1] diffcore: add a filter to find a specific blob

From
Stefan Beller <sbeller@google.com>
Date
Dec 8, 2017, 20:39 UTC
Message-ID
<CAGZ79kaos7cmQe3bmR5gCVXbUjBBQdSYYOE11egnDEMaX-7xSA@mail.gmail.com>
In-Reply-To
<20171208201957.GA456@sigill.intra.peff.net>
On Fri, Dec 8, 2017 at 12:19 PM, Jeff King <peff@peff.net> wrote:
Show 26 quoted lines
> On Fri, Dec 08, 2017 at 04:28:23PM +0000, Ramsay Jones wrote:
>
>> On 08/12/17 09:34, Jeff King wrote:
>> > On Thu, Dec 07, 2017 at 04:24:47PM -0800, Stefan Beller wrote:
>> [snip]
>> >> Junio hinted at a different approach of solving this problem, which this
>> >> patch implements. Teach the diff machinery another flag for restricting
>> >> the information to what is shown. For example:
>> >>
>> >>   $ ./git log --oneline --blobfind=v2.0.0:Makefile
>> >>   b2feb64309 Revert the whole "ask curl-config" topic for now
>> >>   47fbfded53 i18n: only extract comments marked with "TRANSLATORS:"
>> >>
>> >> we observe that the Makefile as shipped with 2.0 was introduced in
>> >> v1.9.2-471-g47fbfded53 and replaced in v2.0.0-rc1-5-gb2feb64309 by
>> >> a different blob.
>>
>> Sorry, this has nothing to do with this specific thread. :(
>>
>> However, the above caught my eye. Commit b2feb64309 does not 'replace
>> the Makefile with a different blob'. That commit was a 'last minute'
>> revert of a topic _prior_ to v2.0.0, which resulted in the _same_
>> blob as commit 47fbfded53. (i.e. a53f3a8326c2e62dc79bae7169d64137ac3dab20).
>
> Right, I think the patch is working as advertised but the commit message
> misinterprets the results. :)
Thanks for digging. I came to a similar realization.
> If you add --raw, you can see that both commits introduce that blob, and
> it never "goes away". That's because that happened in a merge, which we
> don't diff in a default log invocation.

We should when --raw is given. --raw is documented as "For each commit, show a summary of changes using the raw diff format." and I would argue that 'each commit' includes merges. Though I guess this may have implications for long time users.

Show 11 quoted lines
> And in fact finding where this "goes away" is hard, because the merge
> doesn't trigger "-c" or "--cc". It's 8eaf517835, which presumably was
> forked before the revert in b2feb64309, and then the merge was able to
> replace that blob completely with the other side of the merge.
>
> Viewing with "-m" turns up a bunch of uninteresting merges. Looking at
> "--first-parent" is how I got 8eaf517835.
>
> So I think this one is tricky because of the revert. In the same way
> that pathspec-limiting is often tricky in the face of a revert, because
> the merges "hide" interesting things happening.

yup, hidden merges are unfortunate. Is there an easy way to find out about merges? (Junio hints at having tests around merges, which I'll do next)

Previous: Jeff KingNext: Jeff King
Message 6 of 25 in “diffcore-blobfind”
  1. 0/1 diffcore-blobfindStefan Beller, Dec 8, 2017
  2. 1/1 diffcore: add a filter to find a specific blobStefan Beller, Dec 8, 2017
  3. Jeff KingDec 8, 2017
  4. Ramsay JonesDec 8, 2017
  5. Jeff KingDec 8, 2017
  6. Stefan BellerDec 8, 2017
  7. Jeff KingDec 8, 2017
  8. Junio C HamanoDec 8, 2017
  9. Junio C HamanoDec 8, 2017
  10. Stefan BellerDec 8, 2017
  11. Junio C HamanoDec 8, 2017
  12. 0/1 diff-core blobfindStefan Beller, Dec 11, 2017
  13. 1/1 diffcore: add a filter to find a specific blobStefan Beller, Dec 11, 2017
  14. Junio C HamanoDec 11, 2017
  15. Stefan BellerDec 12, 2017
  16. diffcore: add a filter to find a specific blobStefan Beller, Dec 12, 2017
  17. Junio C HamanoDec 12, 2017
  18. Jonathan NiederDec 14, 2017
  19. Stefan BellerDec 14, 2017
  20. Jonathan NiederDec 14, 2017
  21. Junio C HamanoDec 15, 2017
  22. Stefan BellerDec 27, 2017
  23. Jonathan NiederDec 27, 2017
  24. Junio C HamanoDec 27, 2017
  25. Junio C HamanoDec 14, 2017

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.