{"thread":{"id":"44592","subject":"git 2.11.0 error when pushing to remote located on a windows share","startedAt":"2016-12-02T18:20:35Z","lastAt":"2016-12-23T17:05:05Z","messageCount":6,"participants":["thomas.attwood@stfc.ac.uk","Jeff King","Torsten Bögershausen","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"306798","messageId":"AABB04BF1441D24CB4E9FCF46394F17D666F34E1@exchmbx01","threadId":"44592","inReplyTo":null,"subject":"git 2.11.0 error when pushing to remote located on a windows share","fromName":"","fromEmail":"thomas.attwood@stfc.ac.uk","sentAt":"2016-12-02T18:02:16Z","receivedAt":"2016-12-02T18:20:35Z","isPatch":false,"sender":{"key":"thomas.attwood@stfc.ac.uk","avatar":null},"body":"After updating git from 2.10.0 to 2.11.0 when trying to push any changes to a repo located in a windows share, the following error occurs:\n\n$ git push origin test\nCounting objects: 2, done.\nDelta compression using up to 8 threads.\nCompressing objects: 100% (2/2), done.\nWriting objects: 100% (2/2), 284 bytes | 0 bytes/s, done.\nTotal 2 (delta 1), reused 1 (delta 0)\nremote: error: object directory /path/to/dir/objects does not exist; check .git/objects/info/alternates.\nremote: fatal: unresolved deltas left after unpacking\nerror: unpack failed: unpack-objects abnormal exit\nTo //path/to/dir\n ! [remote rejected] test -> test (unpacker error)\nerror: failed to push some refs to '//path/to/dir'\n\n\nNo error occurs if pushing to the same repo (a direct copy into a local directory) using 2.11.0.\n\n$ git push local_test test\nCounting objects: 2, done.\nDelta compression using up to 8 threads.\nCompressing objects: 100% (2/2), done.\nWriting objects: 100% (2/2), 284 bytes | 0 bytes/s, done.\nTotal 2 (delta 1), reused 1 (delta 0)\nTo C:/path/to/dir\n * [new branch]      test -> test\n\n---\n\ngit remotes:\n\n$ git remote -v\nlocal_test      C:/path/to/dir (fetch)\nlocal_test      C:/path/to/dir (push)\norigin  //path/to/dir (fetch)\norigin  //path/to/dir (push)\n\n---\n\nUsing `git fsck --full` in both 2.11.0 and 2.10.0, it doesn't reveal any additional problems.\n\n$ git fsck --full\nChecking object directories: 100% (256/256), done.\nChecking objects: 100% (2710/2710), done.\n\n---\n\nI'm not sure if it's related but ` object directory /path/to/dir/objects does not exist` doesn't contain an expected second slash.\n\n    Thomas 'Panda' Attwood.\n"},{"id":"306823","messageId":"20161202223749.2n7wa37e5w6446uv@sigill.intra.peff.net","threadId":"44592","inReplyTo":"AABB04BF1441D24CB4E9FCF46394F17D666F34E1@exchmbx01","subject":"Re: git 2.11.0 error when pushing to remote located on a windows share","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-12-02T22:37:50Z","receivedAt":"2016-12-02T22:37:58Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Dec 02, 2016 at 06:02:16PM +0000, thomas.attwood@stfc.ac.uk wrote:\n\n> After updating git from 2.10.0 to 2.11.0 when trying to push any\n> changes to a repo located in a windows share, the following error\n> occurs:\n> \n> $ git push origin test\n> Counting objects: 2, done.\n> Delta compression using up to 8 threads.\n> Compressing objects: 100% (2/2), done.\n> Writing objects: 100% (2/2), 284 bytes | 0 bytes/s, done.\n> Total 2 (delta 1), reused 1 (delta 0)\n> remote: error: object directory /path/to/dir/objects does not exist; check .git/objects/info/alternates.\n> remote: fatal: unresolved deltas left after unpacking\n> error: unpack failed: unpack-objects abnormal exit\n> To //path/to/dir\n>  ! [remote rejected] test -> test (unpacker error)\n> error: failed to push some refs to '//path/to/dir'\n\nHmm. This is probably related to the quarantine-push change in v2.11;\nthe receiving end will write the objects into a temporary directory but\npoint to the original via GIT_ALTERNATE_OBJECT_DIRECTORIES. That pointer\nisn't working for some reason, so the receiver can't resolve the deltas\nit needs.\n\nAs you noted, the extra \"/\" is missing in the error message, and that\nsounds like a plausible cause for what you're seeing. I'm not sure where\nthe slash is getting dropped, though. The value in the environment comes\nfrom calling absolute_path(get_object_directory()), so I suspect the\nreal problem is not in the quarantine code, but it's just triggering a\nlatent bug elsewhere (either in absolute_path(), or in the code which\ngenerates the objdir path).\n\n> No error occurs if pushing to the same repo (a direct copy into a local directory) using 2.11.0.\n> \n> $ git push local_test test\n> Counting objects: 2, done.\n> Delta compression using up to 8 threads.\n> Compressing objects: 100% (2/2), done.\n> Writing objects: 100% (2/2), 284 bytes | 0 bytes/s, done.\n> Total 2 (delta 1), reused 1 (delta 0)\n> To C:/path/to/dir\n>  * [new branch]      test -> test\n\nThe fact that it works using the non-UNC path reinforces my feeling that\nsomething is normalizing the absolute path incorrectly.\n\n> Using `git fsck --full` in both 2.11.0 and 2.10.0, it doesn't reveal any additional problems.\n\nYeah, I don't think there is anything wrong with your repo. It's just a\npath-building issue internal to the receiving process.\n\n-Peff\n"},{"id":"306887","messageId":"20161204080914.GB2415@tb-raspi","threadId":"44592","inReplyTo":"20161202223749.2n7wa37e5w6446uv@sigill.intra.peff.net","subject":"Re: git 2.11.0 error when pushing to remote located on a windows share","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-12-04T08:09:14Z","receivedAt":"2016-12-04T08:09:52Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Fri, Dec 02, 2016 at 05:37:50PM -0500, Jeff King wrote:\n> On Fri, Dec 02, 2016 at 06:02:16PM +0000, thomas.attwood@stfc.ac.uk wrote:\n> \n> > After updating git from 2.10.0 to 2.11.0 when trying to push any\n> > changes to a repo located in a windows share, the following error\n> > occurs:\n> > \n> > $ git push origin test\n> > Counting objects: 2, done.\n> > Delta compression using up to 8 threads.\n> > Compressing objects: 100% (2/2), done.\n> > Writing objects: 100% (2/2), 284 bytes | 0 bytes/s, done.\n> > Total 2 (delta 1), reused 1 (delta 0)\n> > remote: error: object directory /path/to/dir/objects does not exist; check .git/objects/info/alternates.\n> > remote: fatal: unresolved deltas left after unpacking\n> > error: unpack failed: unpack-objects abnormal exit\n> > To //path/to/dir\n> >  ! [remote rejected] test -> test (unpacker error)\n> > error: failed to push some refs to '//path/to/dir'\n> \n> Hmm. This is probably related to the quarantine-push change in v2.11;\n> the receiving end will write the objects into a temporary directory but\n> point to the original via GIT_ALTERNATE_OBJECT_DIRECTORIES. That pointer\n> isn't working for some reason, so the receiver can't resolve the deltas\n> it needs.\n> \n> As you noted, the extra \"/\" is missing in the error message, and that\n> sounds like a plausible cause for what you're seeing. I'm not sure where\n> the slash is getting dropped, though. The value in the environment comes\n> from calling absolute_path(get_object_directory()), so I suspect the\n> real problem is not in the quarantine code, but it's just triggering a\n> latent bug elsewhere (either in absolute_path(), or in the code which\n> generates the objdir path).\n> \n> > No error occurs if pushing to the same repo (a direct copy into a local directory) using 2.11.0.\n> > \n> > $ git push local_test test\n> > Counting objects: 2, done.\n> > Delta compression using up to 8 threads.\n> > Compressing objects: 100% (2/2), done.\n> > Writing objects: 100% (2/2), 284 bytes | 0 bytes/s, done.\n> > Total 2 (delta 1), reused 1 (delta 0)\n> > To C:/path/to/dir\n> >  * [new branch]      test -> test\n> \n> The fact that it works using the non-UNC path reinforces my feeling that\n> something is normalizing the absolute path incorrectly.\n> \n> > Using `git fsck --full` in both 2.11.0 and 2.10.0, it doesn't reveal any additional problems.\n> \n> Yeah, I don't think there is anything wrong with your repo. It's just a\n> path-building issue internal to the receiving process.\n> \n\nThere seems to be another issue, which may or may not being related:\nhttps://github.com/git-for-windows/git/issues/979\n\nThis is pure speculation:\nCould it be that a '/' is lost because of a change in the underlying\nMsys2 between 2.10 and 2.11 ?\n\nDscho, (or anybody else) any ideas? \n\n"},{"id":"306927","messageId":"AABB04BF1441D24CB4E9FCF46394F17D666F3805@exchmbx01","threadId":"44592","inReplyTo":"20161204080914.GB2415@tb-raspi","subject":"RE: git 2.11.0 error when pushing to remote located on a windows share","fromName":"","fromEmail":"thomas.attwood@stfc.ac.uk","sentAt":"2016-12-05T11:05:40Z","receivedAt":"2016-12-05T11:20:09Z","isPatch":false,"sender":{"key":"thomas.attwood@stfc.ac.uk","avatar":null},"body":"On Sun, 4 Dec 2016 08:09:14 +0000, Torsten BÃ¶gershausen wrote:\n> There seems to be another issue, which may or may not being related:\n> https://github.com/git-for-windows/git/issues/979\n\nI think this is the same issue. I've posted my trace command output there as\nIt might be more appropriate:\nhttps://github.com/git-for-windows/git/issues/979#issuecomment-264816175\n\n"},{"id":"306990","messageId":"91983cb6-eed8-987d-bdda-c0fe55a9d139@web.de","threadId":"44592","inReplyTo":"AABB04BF1441D24CB4E9FCF46394F17D666F3805@exchmbx01","subject":"Re: git 2.11.0 error when pushing to remote located on a windows share","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-12-06T03:09:52Z","receivedAt":"2016-12-06T03:16:58Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2016-12-05 12:05, thomas.attwood@stfc.ac.uk wrote:\n> On Sun, 4 Dec 2016 08:09:14 +0000, Torsten BÃ¶gershausen wrote:\n>> There seems to be another issue, which may or may not being related:\n>> https://github.com/git-for-windows/git/issues/979\n> \n> I think this is the same issue. I've posted my trace command output there as\n> It might be more appropriate:\n> https://github.com/git-for-windows/git/issues/979#issuecomment-264816175\n> \nThanks for the trace.\nI think that the problem comes from the \"cwd\", when a UNC name is used.\n\ncd //SERVER/share/somedir\ndoes not work under Windows, the is no chance to change into that directory.\nDoes anybody know out of his head why and since when we change the directory\nlike this ?\nOr \"git bisect\" may help.\n\n\n\n"},{"id":"308301","messageId":"alpine.DEB.2.20.1612231803530.155951@virtualbox","threadId":"44592","inReplyTo":"91983cb6-eed8-987d-bdda-c0fe55a9d139@web.de","subject":"Re: git 2.11.0 error when pushing to remote located on a windows share","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-12-23T17:04:37Z","receivedAt":"2016-12-23T17:05:05Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 6 Dec 2016, Torsten Bögershausen wrote:\n\n> On 2016-12-05 12:05, thomas.attwood@stfc.ac.uk wrote:\n> > On Sun, 4 Dec 2016 08:09:14 +0000, Torsten BÃ¶gershausen wrote:\n> >> There seems to be another issue, which may or may not being related:\n> >> https://github.com/git-for-windows/git/issues/979\n> > \n> > I think this is the same issue. I've posted my trace command output there as\n> > It might be more appropriate:\n> > https://github.com/git-for-windows/git/issues/979#issuecomment-264816175\n> > \n> Thanks for the trace.\n> I think that the problem comes from the \"cwd\", when a UNC name is used.\n> \n> cd //SERVER/share/somedir\n> does not work under Windows, the is no chance to change into that directory.\n> Does anybody know out of his head why and since when we change the directory\n> like this ?\n> Or \"git bisect\" may help.\n\nFor the record, Hannes Sixt came up with a patch that fixes #979, and\nwhich already made it into Git for Windows' `master`.\n\nCiao,\nJohannes"}]}