Re: [PATCH v2 1/2] Add test to describe expectation of blame --reverse with branched history

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

 



On Wed, Oct 21, 2015 at 09:19:45PM -0700, Junio C Hamano wrote:
> Let me try.
> 
>  (1) for merges, an edge with '*' denotes the one to the first
>      parent.
>  (2) a commit that touches file.t are in capital
> 
>            c1---a3
>           /    *
>          /    /
>    A0---a1--*a2
>      \      /
>       b1---B2
> 
> Did I draw it correctly?

Yes. Though I would

>> +test_expect_failure 'blame --reverse finds B1, not C1' '
>> +	git blame --porcelain --reverse A0..A3 -- file.t >actual_full &&
>> +	head -1 <actual_full | sed -e "sX .*XX" >actual &&
> 
> "head -n 1" is more POSIXy way to spell this.
> 
> Don't get cute with sXXX in sed script when the usual s/// suffices;
> the only effect of the cuteness is to waste readers' time, who have
> to wonder if there is something interesting going on.

Ok. Will fix it and add the graph.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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]