Re: [PATCH 2/2] blame: show "previous" information in --porcelain/--incremental format
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jun 6, 2008, 09:27 UTC
- 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:
Show 6 quoted lines
> When the final blame is laid for a line to a <commit, path> 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.
[...]
Show 5 quoted lines
> + 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 <sha-1 of commit> <filename>" headers?
-- Jakub Narebski Poland