{"thread":{"id":"40361","subject":"Big path on git add file [windows bug]","startedAt":"2015-09-16T08:01:28Z","lastAt":"2015-09-16T09:40:22Z","messageCount":2,"participants":["Alexey Kasyanchuk","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"270102","messageId":"CAMg53oum4s2HE5A-H4g-3N8akOm4KetHM6ntUqRPnygLRALwpw@mail.gmail.com","threadId":"40361","inReplyTo":null,"subject":"Big path on git add file [windows bug]","fromName":"Alexey Kasyanchuk","fromEmail":"degitx@gmail.com","sentAt":"2015-09-16T08:01:28Z","receivedAt":"2015-09-16T08:01:28Z","isPatch":false,"sender":{"key":"degitx@gmail.com","avatar":null},"body":"I tried add one of node.js module to git project. But add operation failed:\n\nlibgit2 returned: Invalid path for filesystem\n'E:/Projects/vsteams/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-build/node_modules/decompress/node_modules/decompress-tar/node_modules/strip-dirs/node_modules/is-natural-number/is-natural-number-cjs.js':\nData area passed to a system call is too small.\n\nIs this windows problem or problem with libgit2 realization on windows\n(windows 7 by the way)? It looked like problem with big system path\n(276 symbols). May be some sulution for this?\n\nVersion: Git-2.5.2.2-64-bit\n\n-- \nBest regards,\nAlexey Kasyanchuk\nC/C++ Developer\n\n\nSkype: degitx\nmobile: +375295777373\n"},{"id":"270106","messageId":"01b34f993289e7dcef5c6fef3d855372@dscho.org","threadId":"40361","inReplyTo":"CAMg53oum4s2HE5A-H4g-3N8akOm4KetHM6ntUqRPnygLRALwpw@mail.gmail.com","subject":"Re: Big path on git add file [windows bug]","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-09-16T09:40:22Z","receivedAt":"2015-09-16T09:40:22Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Alexey,\n\nOn 2015-09-16 10:01, Alexey Kasyanchuk wrote:\n> I tried add one of node.js module to git project. But add operation failed:\n> \n> libgit2 returned: Invalid path for filesystem\n> 'E:/Projects/vsteams/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-gifsicle/node_modules/gifsicle/node_modules/bin-build/node_modules/decompress/node_modules/decompress-tar/node_modules/strip-dirs/node_modules/is-natural-number/is-natural-number-cjs.js':\n> Data area passed to a system call is too small.\n\nIt is indeed too small for normal operations (MAX_PATH is somewhere around 248). However, as far as I know, libgit2 has internal code to convert the path into a form that the Win32 API can handle.\n\n> Is this windows problem or problem with libgit2 realization on windows\n> (windows 7 by the way)? It looked like problem with big system path\n> (276 symbols). May be some sulution for this?\n\nYes, there is a sulution for this. But it is unclear whether you have that already or not because you were a little parsimonious with information. For example, I have no idea which libgit2 version you use, in which context, what program you use to call libgit2, etc.\n\nSo I am left guessing, which is a little bit inefficient.\n\nIn any case, the work-around for the issue you described is in https://github.com/libgit2/libgit2/commit/cceae9a25d0bed8b00f4981e051d5f380ef54401 which is part of v0.22.1.\n\n> Version: Git-2.5.2.2-64-bit\n\nNo, that is not the correct version. This looks like the current Git for Windows version, but the error you reported is clearly a libgit2 error message. And that Git for Windows version contains no libgit2 at all.\n\nPlease clarify. You might want to err on the side of verbosity to avoid unnecessary back-and-forth.\n\nCiao,\nJohannes\n"}]}