git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git 2.11.0 error when pushing to remote located on a windows share
@ 2016-12-02 18:02 thomas.attwood
  2016-12-02 22:37 ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: thomas.attwood @ 2016-12-02 18:02 UTC (permalink / raw)
  To: git

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:

$ git push origin test
Counting objects: 2, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 284 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 1 (delta 0)
remote: error: object directory /path/to/dir/objects does not exist; check .git/objects/info/alternates.
remote: fatal: unresolved deltas left after unpacking
error: unpack failed: unpack-objects abnormal exit
To //path/to/dir
 ! [remote rejected] test -> test (unpacker error)
error: failed to push some refs to '//path/to/dir'


No error occurs if pushing to the same repo (a direct copy into a local directory) using 2.11.0.

$ git push local_test test
Counting objects: 2, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 284 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 1 (delta 0)
To C:/path/to/dir
 * [new branch]      test -> test

---

git remotes:

$ git remote -v
local_test      C:/path/to/dir (fetch)
local_test      C:/path/to/dir (push)
origin  //path/to/dir (fetch)
origin  //path/to/dir (push)

---

Using `git fsck --full` in both 2.11.0 and 2.10.0, it doesn't reveal any additional problems.

$ git fsck --full
Checking object directories: 100% (256/256), done.
Checking objects: 100% (2710/2710), done.

---

I'm not sure if it's related but ` object directory /path/to/dir/objects does not exist` doesn't contain an expected second slash.

    Thomas 'Panda' Attwood.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git 2.11.0 error when pushing to remote located on a windows share
  2016-12-02 18:02 git 2.11.0 error when pushing to remote located on a windows share thomas.attwood
@ 2016-12-02 22:37 ` Jeff King
  2016-12-04  8:09   ` Torsten Bögershausen
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff King @ 2016-12-02 22:37 UTC (permalink / raw)
  To: thomas.attwood; +Cc: git

On Fri, Dec 02, 2016 at 06:02:16PM +0000, thomas.attwood@stfc.ac.uk wrote:

> 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:
> 
> $ git push origin test
> Counting objects: 2, done.
> Delta compression using up to 8 threads.
> Compressing objects: 100% (2/2), done.
> Writing objects: 100% (2/2), 284 bytes | 0 bytes/s, done.
> Total 2 (delta 1), reused 1 (delta 0)
> remote: error: object directory /path/to/dir/objects does not exist; check .git/objects/info/alternates.
> remote: fatal: unresolved deltas left after unpacking
> error: unpack failed: unpack-objects abnormal exit
> To //path/to/dir
>  ! [remote rejected] test -> test (unpacker error)
> error: failed to push some refs to '//path/to/dir'

Hmm. This is probably related to the quarantine-push change in v2.11;
the receiving end will write the objects into a temporary directory but
point to the original via GIT_ALTERNATE_OBJECT_DIRECTORIES. That pointer
isn't working for some reason, so the receiver can't resolve the deltas
it needs.

As you noted, the extra "/" is missing in the error message, and that
sounds like a plausible cause for what you're seeing. I'm not sure where
the slash is getting dropped, though. The value in the environment comes
from calling absolute_path(get_object_directory()), so I suspect the
real problem is not in the quarantine code, but it's just triggering a
latent bug elsewhere (either in absolute_path(), or in the code which
generates the objdir path).

> No error occurs if pushing to the same repo (a direct copy into a local directory) using 2.11.0.
> 
> $ git push local_test test
> Counting objects: 2, done.
> Delta compression using up to 8 threads.
> Compressing objects: 100% (2/2), done.
> Writing objects: 100% (2/2), 284 bytes | 0 bytes/s, done.
> Total 2 (delta 1), reused 1 (delta 0)
> To C:/path/to/dir
>  * [new branch]      test -> test

The fact that it works using the non-UNC path reinforces my feeling that
something is normalizing the absolute path incorrectly.

> Using `git fsck --full` in both 2.11.0 and 2.10.0, it doesn't reveal any additional problems.

Yeah, I don't think there is anything wrong with your repo. It's just a
path-building issue internal to the receiving process.

-Peff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git 2.11.0 error when pushing to remote located on a windows share
  2016-12-02 22:37 ` Jeff King
@ 2016-12-04  8:09   ` Torsten Bögershausen
  2016-12-05 11:05     ` thomas.attwood
  0 siblings, 1 reply; 6+ messages in thread
From: Torsten Bögershausen @ 2016-12-04  8:09 UTC (permalink / raw)
  To: Jeff King; +Cc: thomas.attwood, git

On Fri, Dec 02, 2016 at 05:37:50PM -0500, Jeff King wrote:
> On Fri, Dec 02, 2016 at 06:02:16PM +0000, thomas.attwood@stfc.ac.uk wrote:
> 
> > 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:
> > 
> > $ git push origin test
> > Counting objects: 2, done.
> > Delta compression using up to 8 threads.
> > Compressing objects: 100% (2/2), done.
> > Writing objects: 100% (2/2), 284 bytes | 0 bytes/s, done.
> > Total 2 (delta 1), reused 1 (delta 0)
> > remote: error: object directory /path/to/dir/objects does not exist; check .git/objects/info/alternates.
> > remote: fatal: unresolved deltas left after unpacking
> > error: unpack failed: unpack-objects abnormal exit
> > To //path/to/dir
> >  ! [remote rejected] test -> test (unpacker error)
> > error: failed to push some refs to '//path/to/dir'
> 
> Hmm. This is probably related to the quarantine-push change in v2.11;
> the receiving end will write the objects into a temporary directory but
> point to the original via GIT_ALTERNATE_OBJECT_DIRECTORIES. That pointer
> isn't working for some reason, so the receiver can't resolve the deltas
> it needs.
> 
> As you noted, the extra "/" is missing in the error message, and that
> sounds like a plausible cause for what you're seeing. I'm not sure where
> the slash is getting dropped, though. The value in the environment comes
> from calling absolute_path(get_object_directory()), so I suspect the
> real problem is not in the quarantine code, but it's just triggering a
> latent bug elsewhere (either in absolute_path(), or in the code which
> generates the objdir path).
> 
> > No error occurs if pushing to the same repo (a direct copy into a local directory) using 2.11.0.
> > 
> > $ git push local_test test
> > Counting objects: 2, done.
> > Delta compression using up to 8 threads.
> > Compressing objects: 100% (2/2), done.
> > Writing objects: 100% (2/2), 284 bytes | 0 bytes/s, done.
> > Total 2 (delta 1), reused 1 (delta 0)
> > To C:/path/to/dir
> >  * [new branch]      test -> test
> 
> The fact that it works using the non-UNC path reinforces my feeling that
> something is normalizing the absolute path incorrectly.
> 
> > Using `git fsck --full` in both 2.11.0 and 2.10.0, it doesn't reveal any additional problems.
> 
> Yeah, I don't think there is anything wrong with your repo. It's just a
> path-building issue internal to the receiving process.
> 

There seems to be another issue, which may or may not being related:
https://github.com/git-for-windows/git/issues/979

This is pure speculation:
Could it be that a '/' is lost because of a change in the underlying
Msys2 between 2.10 and 2.11 ?

Dscho, (or anybody else) any ideas? 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: git 2.11.0 error when pushing to remote located on a windows share
  2016-12-04  8:09   ` Torsten Bögershausen
@ 2016-12-05 11:05     ` thomas.attwood
  2016-12-06  3:09       ` Torsten Bögershausen
  0 siblings, 1 reply; 6+ messages in thread
From: thomas.attwood @ 2016-12-05 11:05 UTC (permalink / raw)
  To: tboegi, peff; +Cc: git

On Sun, 4 Dec 2016 08:09:14 +0000, Torsten Bögershausen wrote:
> There seems to be another issue, which may or may not being related:
> https://github.com/git-for-windows/git/issues/979

I think this is the same issue. I've posted my trace command output there as
It might be more appropriate:
https://github.com/git-for-windows/git/issues/979#issuecomment-264816175


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git 2.11.0 error when pushing to remote located on a windows share
  2016-12-05 11:05     ` thomas.attwood
@ 2016-12-06  3:09       ` Torsten Bögershausen
  2016-12-23 17:04         ` Johannes Schindelin
  0 siblings, 1 reply; 6+ messages in thread
From: Torsten Bögershausen @ 2016-12-06  3:09 UTC (permalink / raw)
  To: thomas.attwood, peff; +Cc: git

On 2016-12-05 12:05, thomas.attwood@stfc.ac.uk wrote:
> On Sun, 4 Dec 2016 08:09:14 +0000, Torsten Bögershausen wrote:
>> There seems to be another issue, which may or may not being related:
>> https://github.com/git-for-windows/git/issues/979
> 
> I think this is the same issue. I've posted my trace command output there as
> It might be more appropriate:
> https://github.com/git-for-windows/git/issues/979#issuecomment-264816175
> 
Thanks for the trace.
I think that the problem comes from the "cwd", when a UNC name is used.

cd //SERVER/share/somedir
does not work under Windows, the is no chance to change into that directory.
Does anybody know out of his head why and since when we change the directory
like this ?
Or "git bisect" may help.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: git 2.11.0 error when pushing to remote located on a windows share
  2016-12-06  3:09       ` Torsten Bögershausen
@ 2016-12-23 17:04         ` Johannes Schindelin
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Schindelin @ 2016-12-23 17:04 UTC (permalink / raw)
  To: Torsten Bögershausen; +Cc: thomas.attwood, peff, git

[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]

Hi,

On Tue, 6 Dec 2016, Torsten Bögershausen wrote:

> On 2016-12-05 12:05, thomas.attwood@stfc.ac.uk wrote:
> > On Sun, 4 Dec 2016 08:09:14 +0000, Torsten Bögershausen wrote:
> >> There seems to be another issue, which may or may not being related:
> >> https://github.com/git-for-windows/git/issues/979
> > 
> > I think this is the same issue. I've posted my trace command output there as
> > It might be more appropriate:
> > https://github.com/git-for-windows/git/issues/979#issuecomment-264816175
> > 
> Thanks for the trace.
> I think that the problem comes from the "cwd", when a UNC name is used.
> 
> cd //SERVER/share/somedir
> does not work under Windows, the is no chance to change into that directory.
> Does anybody know out of his head why and since when we change the directory
> like this ?
> Or "git bisect" may help.

For the record, Hannes Sixt came up with a patch that fixes #979, and
which already made it into Git for Windows' `master`.

Ciao,
Johannes

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-12-23 17:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-02 18:02 git 2.11.0 error when pushing to remote located on a windows share thomas.attwood
2016-12-02 22:37 ` Jeff King
2016-12-04  8:09   ` Torsten Bögershausen
2016-12-05 11:05     ` thomas.attwood
2016-12-06  3:09       ` Torsten Bögershausen
2016-12-23 17:04         ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).