git在提交消息中说'重写'或'重命名'是什么意思? [英] What does it mean when git says 'rewrite' or 'rename' in a commit message?

查看:159
本文介绍了git在提交消息中说'重写'或'重命名'是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行 git commit 会导致以下输出:

Running a git commit leads to the following output:

[manu@host] git: git commit -a -m "StreamIt instrumentation"
[master 263410f] StreamIt instrumentation
62 files changed, 6117 insertions(+), 5748 deletions(-)
rewrite Code/ALCHEMY/streamit-src-2.1.1/src/at/dms/kjc/cluster/ClusterBackend.java (91%)
rewrite Code/ALCHEMY/streamit-src-2.1.1/src/at/dms/kjc/cluster/ClusterCodeGenerator.java (95%)
rewrite Code/ALCHEMY/streamit-src-2.1.1/src/at/dms/kjc/cluster/code/FlatIRToCluster.java (94%)
rewrite Code/ALCHEMY/streamit-src-2.1.1/src/at/dms/kjc/common/ToCCommon.java (92%)
rewrite Code/ALCHEMY/streamit-src-2.1.1/src/at/dms/kjc/flatgraph/ScheduledStaticStreamGraph.java (93%)
rename Code/ALCHEMY/streamit-src-2.1.1/src/at/dms/kjc/sir/lowering/fission/{StatelessDuplicate.java => HorizontalFission.java} (98%)
rewrite Code/ALCHEMY/streamit-src-2.1.1/src/at/dms/kjc/sir/lowering/partition/dynamicprog/DynamicProgPartitioner.java (93%)




  • 当git报告文件为'rewrite'时,git是什么意思?

  • 关联百分比的含义是什么?

  • 为什么只有在这个提交中更改的62个关联的百分比?
  • li>

    • What does git mean when it reports a file as 'rewrite'?
    • What is the meaning of the associated percentage?
    • Why is a percentage only associated with these lines among the 62 changed in this commit?
    • 推荐答案

      Git使用启发式来确定更改是重命名还是复制文件,如果它是对文件的重写。粗略地说,如果旧版本和新版本之间的差异大于新版本本身,则是重写。

      Git uses heuristics to determine if a change was a renaming or copying of a file, and also if it is a "rewriting" of the file. Roughly speaking, if the diff between the old and new version is bigger than the new version itself, it's a "rewrite".

      这是针对git的原始用例更改源文件,通常会进行本地化更改:由于它基于逐行比较,因此重新注入源文件等内容可能会触发它。此外,由于它是即时确定的,所以diff选项(如-b和-w)可以改变评估改变是否为重写(或复制或重命名)。

      This is tuned for git's original use case of changing source files, most often making localised changes: since it is based on a line-by-line diff, things like reindenting a source file can trigger it. Also, since it is determined on-the-fly, diff options like "-b" and "-w" can change the evaluation of whether a change is a rewrite (or a copy, or a rename).

      百分比是git的不相似性指数(与重命名或复制的相似性指数百分比相反)。可能类似于文件中已更改行数的百分比。

      The percentage is git's "dissimilarity index" (as opposed to the percentage "similarity index" for a rename or copy). Probably something like the percentage of lines in the file that have changed.

      这篇关于git在提交消息中说'重写'或'重命名'是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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