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

Re: [PATCH v3] blame: report correct number of lines in progress when using ranges

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 6, 2022, 16:52 UTC
Message-ID
<xmqq7d82yx06.fsf@gitster.g>
In-Reply-To
<220406.86wng2eh0l.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 9 quoted lines
> Are the small number of missing steps above expected? E.g. 1-2/7 and 5/7
> in the last tets above, ditto the rest?
>
> Mm, yes, looking at assign_blame() in blame.c we'll "skip" some.
>
> So if we ever change that algorithm we'll need to adjust these, but it's
> probably good to notice that then, even if the test_cmp here does
> implicitly encode a bit of internal implementation details, i.e. when
> exactly we update the progress bar.

I do not think that is something we want to test, or distract the developers by forcing them to update the skipping hardcoded in the test.

Is it easy to grab the last progress message from the output? What we care, and have cared in the past, is that we expect that the 100% is paired with the number of lines in the ranges, and the progress actually ends at 100% (we had different bugs that did not bring the meter to 100% at the end), so checking that end result would be what matters most, e.g.

    tr '\015' '\012' output | tail -n 1
or something?
Previous: Ævar Arnfjörð BjarmasonNext: Edmundo Carmona Antoranz
Message 3 of 5 in “blame: report correct number of lines in progress when using ranges”
  1. blame: report correct number of lines in progress when using rangesEdmundo Carmona Antoranz, Apr 5, 2022
  2. Ævar Arnfjörð BjarmasonApr 6, 2022
  3. Junio C HamanoApr 6, 2022
  4. Edmundo Carmona AntoranzApr 6, 2022
  5. Edmundo Carmona AntoranzApr 6, 2022

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.