是否可以确定git diff的每个大块输出影响了谁的代码(根据git blame)? [英] Is it possible to determine whose code (according to `git blame`) was affected by each hunk output by `git diff`?

查看:69
本文介绍了是否可以确定git diff的每个大块输出影响了谁的代码(根据git blame)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个跨领域的承诺,我想根据受影响代码的作者进行拆分,以提高审阅者对他们正在审阅的代码的熟悉程度,并公平地分担审阅负担.

I have a large cross-cutting commit that I would like to split up according to the authors whose code was affected, both to increase the reviewers' familiarity with the code they're reviewing, and to divide the review burden equitably.

我意识到,责任可能会混在一个给定的大块头中,在这种情况下,最好是召集多位审稿人,或者只选择最应受谴责"的一位(随意打破关系就可以了.)

I realize that the blame may be mixed within a given hunk, in which case it would be nice to either collect multiple reviewers or just choose the most "blameworthy" one (breaking ties arbitrarily is fine).

推荐答案

有趣的问题.我仅使用git-flags找不到任何解决方案,但是一些快速的搜索使我找到了该实用程序:

Interesting question. I couldn't find any solution simply using git-flags but some quick googling led me to this utility: git-diff-blame. (I did not write the tool)

它会显示实际的帅哥+帅哥中每行的责备"行.

It displays the actual hunks + the 'blame' line for each line in the hunk.

这篇关于是否可以确定git diff的每个大块输出影响了谁的代码(根据git blame)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆