From: Jakub Narebski Date: Fri, 06 Jun 2008 09:27:59 GMT Subject: Re: [PATCH 2/2] blame: show "previous" information in --porcelain/--incremental format Message-ID: <200806061128.04031.jnareb@gmail.com> In-Reply-To: <7v4p884dlh.fsf_-_@gitster.siamese.dyndns.org> On Tue, 5 Jan 2008, Junio C Hamano wrote: > When the final blame is laid for a line to a pair, it also > gives a "previous" information to --porcelain and --incremental output > format. It gives the parent commit of the blamed commit, _and_ a path in > that parent commit that corresponds to the blamed path --- in short, it is > the origin that would have been blamed (or passed blame through) for the > line _if_ the blamed commit did not change that line. [...] > + if (suspect->previous) { > + struct origin *prev = suspect->previous; > + printf("previous %s ", sha1_to_hex(prev->commit->object.sha1)); > + write_name_quoted(prev->path, stdout, '\n'); > + } What happens if attributed (blamed) commit is "evil merge"? Would git-blame emit multiple "previous " headers? -- Jakub Narebski Poland