Re: Inconsistent results of git blame --porcelain when detecting copies from other files

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

 



Jeff King <peff@xxxxxxxx> writes:

> The simplest way (IMHO) to parse --porcelain output is:
>
>   - maintain a mapping of commit sha1s to the commit's details
>
>   - whenever you see a "<sha1> <line_nr> <orig_nr> [<size-of-hunk>]"
>     line, any key-value fields which follow impact _only_ that sha1, and
>     you should update the details for that map entry
>
>   - when you see the actual tab-indented line content, you have gotten
>     all of the key-value updates for that sha1. You can now safely do
>     what you like with the line entry.

Yup, that was how the output was meant to be read.  At least in the
mind of the person who designed the output format ;-)




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