Why does Git detect rename without --find-renames?

前端 未结 1 1875
我在风中等你
我在风中等你 2021-01-26 02:21

I run git log --name-status -1 and Git detects a renaming. From what I read on https://git-scm.com/docs/git-log, renaming detection is only enabled when --

相关标签:
1条回答
  • 2021-01-26 02:54

    Git will detect renames if directed. This direction is under various control knobs; one of these is the diff.renames setting. The default value for diff.renames is false in Git versions predating Git 2.9, and true in Git versions from 2.9 onward.

    (Note that command line flags override diff.renames, so you can explicitly turn rename detection off if you want. Note also that "plumbing" commands like git diff-tree generally do not read user configuration settings such as diff.renames and diff.renameLimit so that script behavior will be predictable, rather than depending on the user's configuration settings.)

    0 讨论(0)
提交回复
热议问题