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

Re: [PATCH v7 7/8 (edit)] blame: add a fingerprint heuristic to match ignored lines

From
Michael Platings <michael@platin.gs>
Date
May 20, 2019, 20:32 UTC
Message-ID
<CAJDYR9Qm+oQ=Lv53v_zrYaG2pW_TggD4q2ENEa7bR4z900fXyw@mail.gmail.com>
In-Reply-To
<xmqqftpd3br1.fsf@gitster-ct.c.googlers.com>

Hi Junio, The SQUASH??? patches look good to me. Please squash away! Thanks, -Michael

On Fri, 17 May 2019 at 06:12, Junio C Hamano <gitster@pobox.com> wrote:
Show 98 quoted lines
>
> Barret Rhoden <brho@google.com> writes:
>
> > From: Michael Platings <michael@platin.gs>
> >
> > ...
> > Michael removed the bashisms from the tests.
>
> Will replace what's queued.
>
> Note that I have two extra SQUASH??? patches on top of the branch to
> make 'pu' build and test, which you may want to take a look at.
>
> Thanks.
>
>
>
>
> From 82e68b47261ae57e7b368b9eed3450dbbf76e3c1 Mon Sep 17 00:00:00 2001
> From: Junio C Hamano <gitster@pobox.com>
> Date: Thu, 16 May 2019 12:43:27 +0900
> Subject: [PATCH 1/2] SQUASH??? error: decl-after-stmt
>
> ---
>  blame.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/blame.c b/blame.c
> index d55e458770..287841364b 100644
> --- a/blame.c
> +++ b/blame.c
> @@ -925,9 +925,6 @@ static int *fuzzy_find_matching_lines(struct blame_origin *parent,
>         struct fingerprint *fingerprints_a = parent->fingerprints;
>         struct fingerprint *fingerprints_b = target->fingerprints;
>
> -       if (length_a <= 0)
> -               return NULL;
> -
>         int i, *result, *second_best_result,
>                 *certainties, *similarities, similarity_count;
>
> @@ -943,6 +940,9 @@ static int *fuzzy_find_matching_lines(struct blame_origin *parent,
>          */
>         int max_search_distance_a = 10, max_search_distance_b;
>
> +       if (length_a <= 0)
> +               return NULL;
> +
>         if (max_search_distance_a >= length_a)
>                 max_search_distance_a = length_a ? length_a - 1 : 0;
>
> --
> 2.22.0-rc0
>
>
> From 634f3cecaaba9174e81629f8df5942c261e8310b Mon Sep 17 00:00:00 2001
> From: Junio C Hamano <gitster@pobox.com>
> Date: Fri, 17 May 2019 13:45:42 +0900
> Subject: [PATCH 2/2] SQUASH??? test-lint -- seq not portable
>
> ---
>  t/t8014-blame-ignore-fuzzy.sh | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/t/t8014-blame-ignore-fuzzy.sh b/t/t8014-blame-ignore-fuzzy.sh
> index bbf70b0f56..1ff59624e9 100755
> --- a/t/t8014-blame-ignore-fuzzy.sh
> +++ b/t/t8014-blame-ignore-fuzzy.sh
> @@ -298,7 +298,7 @@ EOF
>  last_test=13
>
>  test_expect_success setup '
> -       { for i in $(seq 2 $last_test)
> +       { for i in $(test_seq 2 $last_test)
>         do
>                 # Append each line in a separate commit to make it easy to
>                 # check which original line the blame output relates to.
> @@ -314,7 +314,7 @@ test_expect_success setup '
>                 done } <"a$i"
>         done } &&
>
> -       { for i in $(seq 2 $last_test)
> +       { for i in $(test_seq 2 $last_test)
>         do
>                 # Overwrite the files with the final content.
>                 cp b$i $i &&
> @@ -329,7 +329,7 @@ test_expect_success setup '
>         IGNOREME=$(git rev-parse HEAD)
>  '
>
> -for i in $(seq 2 $last_test); do
> +for i in $(test_seq 2 $last_test); do
>         eval title="\$title$i"
>         test_expect_success "$title" \
>         "git blame -M9 --ignore-rev $IGNOREME $i | sed -e \"$pick_author\" >actual && test_cmp expected$i actual"
> --
> 2.22.0-rc0
>
Previous: Junio C HamanoNext: Barret Rhoden
Message 12 of 15 in “blame: add the ability to ignore commits”
  1. 0/8 blame: add the ability to ignore commitsBarret Rhoden, May 15, 2019
  2. 1/8 fsck: rename and touch up init_skiplist()Barret Rhoden, May 15, 2019
  3. 2/8 Move oidset_parse_file() to oidset.cBarret Rhoden, May 15, 2019
  4. 3/8 blame: use a helper function in blame_chunk()Barret Rhoden, May 15, 2019
  5. 4/8 blame: add the ability to ignore commits and their changesBarret Rhoden, May 15, 2019
  6. 5/8 blame: add config options for the output of ignored or unblamable linesBarret Rhoden, May 15, 2019
  7. 6/8 blame: optionally track line fingerprints during fill_blame_origin()Barret Rhoden, May 15, 2019
  8. 7/8 blame: add a fingerprint heuristic to match ignored linesBarret Rhoden, May 15, 2019
  9. Junio C HamanoMay 16, 2019
  10. 7/8 blame: add a fingerprint heuristic to match ignored linesBarret Rhoden, May 16, 2019
  11. Junio C HamanoMay 17, 2019
  12. Michael PlatingsMay 20, 2019
  13. Barret RhodenMay 20, 2019
  14. Junio C HamanoMay 28, 2019
  15. 8/8 blame: use the fingerprint heuristic to match ignored linesBarret Rhoden, May 15, 2019

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.