From: Junio C Hamano Date: Tue, 21 Feb 2017 06:08:19 GMT Subject: Re: Inconsistent results of git blame --porcelain when detecting copies from other files Message-ID: In-Reply-To: <20170220221540.6vemjdvyvwonpqyt@sigill.intra.peff.net> Jeff King 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 " []" > 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 ;-)