今天在git cherry-pick 的时候出现了merge.renamelimit variable 的警告:

git cherry-pick aa09259109583b98b9d9e7ed0d8eb1b880d1eb97
warning: inexact rename detection was skipped due to too many files.
warning: you may want to set your merge.renamelimit variable to at least 3791 and retry the command.
error: could not apply aa0925910958... mm, page_alloc: reset the zone->watermark_boost early
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Recorded preimage for 'mm/page_alloc.c'

从提示是当前版本离想要cherry-pick 的commit 已经过去太远了。

尝试将该变量设置为4000:

git config --global merge.renamelimit 4000

通过git confit -l 是可以看到已经生效的:

user.name=justinwei
user.email=justinwei@***.com
color.ui=auto
merge.renamelimit=4000
core.repositoryformatversion=0

 

但是再次尝试时出现了下面的问题:

git cherry-pick aa09259109583b98b9d9e7ed0d8eb1b880d1eb97
Performing inexact rename detection: 100% (14034282/14034282), done.
error: could not apply aa0925910958... mm, page_alloc: reset the zone->watermark_boost early
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Recorded preimage for 'mm/page_alloc.c'

 从这个提示来看,至少merge.renamelimit 是消除了,剩下来就是解决无法apply 的问题了。

来看下git status 的结果:

HEAD detached at 7f4d1978a86b
You are currently cherry-picking commit aa0925910958.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)

        both modified:   mm/page_alloc.c

 就是有冲突而无法cherry-pick,将冲突解决掉,然后执行git cherry-pick --continue 就ok 了。。。。

 

 

 

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐