-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Cherry-pick and stash don't work with an error: add_cacheinfo failed to refresh for path '...'; merge aborting. #2781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you try with the latest version to see if it is fixed. Those links are to old reports. This link https://stackoverflow.com/a/57199694/717355 suggests it's a End of Line (EOL) normalisation issue. Have a search of the manuals for 'normalize' and 'eol' for clues on fixing the repo on the particular machine, particularly If you can report back if the latest Git & the --renormalise works for you that would be great. |
Also, if you manage to create a reproduction method for the fault, an MVCE, that would greatly help in sorting out any fixes either in upstream Git, or in Git-for-Windows (if it's special to Windows). Thanks |
@PhilipOakley thanks for your advice.
Also, I've tried to re-commit the changes using As for the MVCE, I'd be happy to provide one but I don't know how. We have quite a large repo that is several years old, and it is under NDA so I'm not eligible to share it. Can I provide anything else, maybe some additional logs, for example? |
@dropsonic Then checkout the commit, which you want to cherry-pick. |
@tboegi each result contains more than 20k lines. Do you want me to post the whole set? |
@dropsonic : |
@tboegi unfortunately, I can't send the list of files in the repository because of legal restrictions from my employer.
|
The .gitattributes file looks wrong to me. To be able to find out if the EOLs are the reason for the |
@tboegi so it should be I checked the commit I was trying to cherry-pick. It was a pure change of a single tracked file. This file is marked as |
@dropsonic |
@tboegi unfortunately, I can't reproduce it in any other repo (probably because they are way more consistent and much younger). Maybe I can enable some advanced logs in Git and collect them? |
My idea was to create an unconsistent repo on purpose. Or somebody else has a public repo, where the code execution in Git can be studied ? |
It's a pity that Git doesn't have any logging that can be enabled to diagnose such issues. Are there any plans to add it? |
Does the It may be a route to creating a minimal example, see https://git-scm.com/docs/git-fast-export/2.28.0#_anonymizing |
@PhilipOakley thanks for the idea, I was not aware of that option. Will try it and let you know the results. |
I have the same issue but with the "git pull origin " as well as "git merge" commands. Is there any resolution for this? in my case i see that a file was renamed. |
@rbagali unfortunately, this is a far distance from a proper Minimal, Complete & Verifiable Example.. Please have a closer look in particular to what |
See also: #1780 |
Since there is no MCVE to work with, and since there has been ample time to provide one, I'll close this ticket. |
Setup
defaults?
to the issue you're seeing?
4 worktrees
Details
cmd/PowerShell
Minimal, Complete, and Verifiable example
this will help us understand the issue.
Successful cherry-pick or merging the stash with the current branch
An error:
error: add_cacheinfo failed to refresh for path 'WebSites/Pure/ContractBasedApiTests/test_soap.sh'; merge aborting.
The stash entry is kept in case you need it again.
URL to that repository to help us with testing?
Unfortunately, it is a private repository that cannot be shared.
There are multiple complains about this issue on the Internet:
https://stackoverflow.com/questions/48080112/git-error-addinfo-cache-failed-for-path-file
https://stackoverflow.com/questions/16112561/error-addinfo-cache-failed-while-cherrypicking
https://www.reddit.com/r/git/comments/e606ld/why_does_this_file_prevents_me_from_merging_my/
Any solution that will help to return the repo into the working state would be much appreciated.
The text was updated successfully, but these errors were encountered: