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

Re: [PATCH v9 7/9] blame: add a fingerprint heuristic to match ignored lines

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Jun 29, 2019, 17:19 UTC
Message-ID
<20190629171954.GG21574@szeder.dev>
In-Reply-To
<20190620163820.231316-8-brho@google.com>
On Thu, Jun 20, 2019 at 12:38:18PM -0400, Barret Rhoden wrote:
Show 6 quoted lines
> diff --git a/t/t8014-blame-ignore-fuzzy.sh b/t/t8014-blame-ignore-fuzzy.sh
> new file mode 100755
> index 000000000000..844396615271
> --- /dev/null
> +++ b/t/t8014-blame-ignore-fuzzy.sh
> @@ -0,0 +1,440 @@
Show 23 quoted lines
> +test_expect_success setup '
> +	{ 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.
> +
> +		line_count=0 &&
> +		{ while IFS= read line
> +		do
> +			line_count=$((line_count+1)) &&
> +			echo "$line" >>"$i" &&
> +			git add "$i" &&
> +			test_tick &&
> +			GIT_AUTHOR_NAME="$line_count" git commit -m "$line_count"
> +		done } <"a$i"
> +	done } &&
> +
> +	{ for i in $(test_seq 2 $last_test)
> +	do
> +		# Overwrite the files with the final content.
> +		cp b$i $i &&
> +		git add $i
> +	done } &&

All three loops above have a pair of {} around them... but why? I don't think they are are necessary and the test does pass without them.

Previous: Barret RhodenNext: michael@platin.gs
Message 9 of 13 in “blame: add the ability to ignore commits”
  1. 0/9 blame: add the ability to ignore commitsBarret Rhoden, Jun 20, 2019
  2. 1/9 fsck: rename and touch up init_skiplist()Barret Rhoden, Jun 20, 2019
  3. 2/9 Move oidset_parse_file() to oidset.cBarret Rhoden, Jun 20, 2019
  4. 3/9 blame: use a helper function in blame_chunk()Barret Rhoden, Jun 20, 2019
  5. 4/9 blame: add the ability to ignore commits and their changesBarret Rhoden, Jun 20, 2019
  6. 5/9 blame: add config options for the output of ignored or unblamable linesBarret Rhoden, Jun 20, 2019
  7. 6/9 blame: optionally track line fingerprints during fill_blame_origin()Barret Rhoden, Jun 20, 2019
  8. 7/9 blame: add a fingerprint heuristic to match ignored linesBarret Rhoden, Jun 20, 2019
  9. SZEDER GáborJun 29, 2019
  10. t8014: remove unnecessary bracesmichael@platin.gs, Jun 30, 2019
  11. Barret RhodenJul 1, 2019
  12. 8/9 blame: use the fingerprint heuristic to match ignored linesBarret Rhoden, Jun 20, 2019
  13. 9/9 blame: add a test to cover blame_coalesce()Barret Rhoden, Jun 20, 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.