{"thread":{"id":"40826","subject":"git cherry-pick gives error: addinfo_cache failed for path","startedAt":"2015-11-18T15:04:15Z","lastAt":"2015-11-18T15:04:15Z","messageCount":1,"participants":["Andrei Neculau"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"273474","messageId":"CAOGnN1e=mj-24uN_Dq2me6U869t62TyPTxePj3Px-Y1_ErGfjw@mail.gmail.com","threadId":"40826","inReplyTo":null,"subject":"git cherry-pick gives error: addinfo_cache failed for path","fromName":"Andrei Neculau","fromEmail":"andrei.neculau@gmail.com","sentAt":"2015-11-18T15:04:15Z","receivedAt":"2015-11-18T15:04:15Z","isPatch":false,"sender":{"key":"andrei.neculau@gmail.com","avatar":null},"body":"UPDATE:\n\nThe initial message (see below) got rejected because it wasn't\ntext/plain, so meanwhile a few things happened.\n\nI was reading the manual pages of gitattributes and saw the note\n\n> When text=auto normalization is enabled in an existing repository, any text files containing CRLFs should be normalized......\n\nindeed, running\n\n> rm ...index && git reset && git add -u && git commit -m \"normalize crlf\"\n\nfixed the initial problem, leaving me with a new QUESTION:\n\nwhy \"git rm -rf --cached . && git reset --hard HEAD\" is NOT showing\ndirty files that need normalization, but \"rm ....index && git reset\"\ndoes?\n\n\n\n\n\n\n\n\n\n\nINITIAL MESSAGE:\n\nHello\n\nI am running \"git cherry-pick <HASH>\" from one maintenance branch B2\nto another B1, where B2 is newer than B1, in a repository with\n.gitattributes containing\n\n> * text=auto\n\n\n\nYou can see an excerpt of the output below.\nFiles 2-3-4 were deleted/renamed in B2 (newer branch). It seems that\ngit cherry-pick is trying to normalize the files, but it fails because\nthe files don't exist in the newer branch.\n\n\n\n> warning: CRLF will be replaced by LF in file1.html.\n> The file will have its original line endings in your working directory.\n> error: addinfo_cache failed for path 'file2.txt'\n> error: addinfo_cache failed for path 'file3.xml'\n> error: addinfo_cache failed for path 'file4.js'\n> U file4.js\n> error: commit is not possible because you have unmerged files.\n> hint: Fix them up in the work tree, and then use 'git add/rm <file>'\n> hint: as appropriate to mark resolution and make a commit.\n> fatal: Exiting because of an unresolved conflict.\n\n\n\n\nI have tried\n\n> git cherry-pick --strategy=recursive -X=no-renormalize <HASH>\n\n\nto no avail.\nAt the moment, the only fix I can have is to remove \"* text=auto\" from\n.gitattributes\n\nI mention that before the cherry-pick, the git status is clean.\n\nI am not subscribed to the mailing list, so please keep me in CC\n\nThank you in advance,\nAndrei\n\n-- \nandreineculau.com\n"}]}