Re: [PATCH 10/22] mailmap tests: get rid of overly complex blame fuzzing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> +	6 6 1
> +	Santa Claus
> +	7 7 1
> +	CTO
> +	EOF
> +
> +	git blame --porcelain one >actual.blame &&
> +	grep -E \
> +		-e "[0-9]+ [0-9]+ [0-9]+$" \
> +		-e "^author .*$" \
> +		actual.blame >actual.grep &&
> +	cut -d " " -f2-4 <actual.grep >actual.fuzz &&

An approach along the lines of ...

	NUM="[0-9][0-9]*"
	sed -n -e "s/^author //p" \
	-e "s/^$OID_REGEX \($NUM $NUM $NUM\)$/\1/p"

... would allow you to drop "cut" and also not assume that names do
not have more than 3 tokens.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux