Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
474 views
in Technique[技术] by (71.8m points)

How to skip inexact rename detection with git cherry-pick

I have a about 10 commits I need to cherry pick from an old branch to a current branch on a large repo. Every time I run the cherry-pick command I get the following:

$ git cherry-pick -x 11a77a55bf
Performing inexact rename detection:   0% (438032/938483560)

I let it complete the first time, which took about about 10-15 minutes. But it does this for every commit I pick. Is there a way to prevent this, at least for the current command?

I tried setting a renameLimit but it didn't help:

git -c diff.renameLimit=1 cherry-pick -x 11a77a55bf
Performing inexact rename detection:   0% (1259342/938483560)
question from:https://stackoverflow.com/questions/65830756/how-to-skip-inexact-rename-detection-with-git-cherry-pick

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

git cherry-pick uses the merge machinery behind the scenes, which has its own configuration related to rename detection: merge.renameLimit.

git -c merge.renameLimit=1 cherry-pick -x 11a77a55bf

does what you want.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...