Re: [git-users] Re: Corrupted repository ?

2010-10-06 Thread Simon Lipp
> Very interesting.
> What happens if you clone on the same host?
> $ cd /tmp/foo
> $ git clone /path/to/test
> or
> $ git clone file:///path/to/test
> ?
> 
> If it fails, try looking at `git fsck`.

On the local side, git clone works and git fsck only indicate some
dandling blob and commits (that's my bad habit of doing git reset
--hard HEAD^ ;)). On the remote machine :
broken link fromtree 869a1d54960d405d661e747c1c056a59cc8d2e9b
  toblob 719d3089ebb11eba608b13070c4e35be5e3969d6
missing blob 719d3089ebb11eba608b13070c4e35be5e3969d6

But it’s an old version of git on the remote machine (1.4.4.4) — I’m not
the admininstrator and he’s not willing to upgrade. 

I said that there’s no problem with the local machine, but it’s only
for cloning. The problematic directory also has problems here :
$ git ls-tree master
16 commit 719d3089ebb11eba608b13070c4e35be5e3969d6  DesktopChaos

The interesting part is :
 - 16 for a directory. It’s the only directory with this mode. I
   don’t know what it means though.
 - the directory is a blob for git 1.4.4.4
 - the directory is a commit for git 1.7.3

The commit that introduced the problematic directory is
f3ef8b57e8e71b44c9c669d32b16faf82c643fce. git log on the remote side
gives up with:
fatal: corrupt tree sha 719d3089ebb11eba608b13070c4e35be5e3969d6

On the local side, better luck:
diff --git a/htdocs/themes/DesktopChaos b/htdocs/themes/DesktopChaos
new file mode 16
index 000..719d308
--- /dev/null
+++ b/htdocs/themes/DesktopChaos
@@ -0,0 +1 @@
+Subproject commit 719d3089ebb11eba608b13070c4e35be5e3969d6

But I don’t remember creating a subproject. In fact, I don’t even know
what is a subproject under git :)

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Digest for git-users@googlegroups.com - 4 Messages in 2 Topics

2010-10-06 Thread Daniel Dotsenko
I looked at git's siurce recently because of the related problem. I was
looking at SmartHTTP protocol specific code and dont see in you message is
about git: or http: protocol, but it could be the same code in the back...

When a recent git client sends a pack file larger than 1mb it switches curl
from http/1.0 to http/1.1, sets ecpect 100 and Transfer-Encoding: chunked

I saw git's libcurl actually NOT wait for answer to expect header and
startsending data in under half a second.

By the looks of it, your work's proxy is not able to process http/1.1
Chunked REQUEST body.

I also did not see any override code in git's invocation of http/1.1
Chunked. It actually does the right thing switching to Chunked requests on
large bodies.

Try using ssh-based connection. It's not http, and thus the headers dont
metter. Otherwize, petition git developers to program an option to override
git client for http proticol to down-switch to http/1.0 for large bodies.


D D




  Topic: Behind Proxy and Getting HTTP code =
417

   James Fang  Oct 06 09:22AM -0700 ^ <#digest_top>

   our company provide internet access for us using proxy,
   but after configured http.proxy, i am keeping get HTTP code 417

   After a little google, i guess it's because the libcurl that git
   use sent the "Expect: 100-continue" header, which the proxy(i guess a
   Squid)
   does not understand and reply with 417: Expection failed.

   I can not change the proxy setting, so below are my questions:
   1) can i disable the Expect header of libcurl?
   i know i can use -H option of curl(the binary), but seems git/
   libcurl does not
   support this option.
   2) or how can i get around this problem without do anything with the
   proxy ?

   Thanks in advance,




   James Fang  Oct 06 09:26AM -0700 ^ <#digest_top>

   maybe some script sit between git and the proxy, just strip off all
   the "Expect" header?
   is there such kind of utility program out of box?

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: Corrupted repository ?

2010-10-06 Thread Konstantin Khomoutov
On Oct 6, 1:11 pm, Simon Lipp  wrote:

> > I'm not sure why later cloning the new repository fails, but I would
> > suggest using more sensible approach to putting the repository to
> > another machine in the first place:
[...]
> > $ git push --mirror foo
> Doesn’t change anything : on my local machine, after creating the
> remote repository with your method :
>
> $ git clone ssh://u...@host/~/test.git
> remote: Generating pack...
> remote: Done counting 10171 objects.
> remote: error: unable to find 719d3089ebb11eba608b13070c4e35be5e3969d6
> remote: fatal: unable to get type of object
> 719d3089ebb11eba608b13070c4e35be5e3969d6 error: git-upload-pack:
> git-pack-objects died with error. fatal: git-upload-pack: aborting due
> to possible repository corruption on the remote side. remote: aborting
> due to possible repository corruption on the remote side. fatal:
> protocol error: bad pack header
>
> Note that git push --mirror indicated “Counting objects: *10170*,
> done” (not 10171).
Very interesting.
What happens if you clone on the same host?
$ cd /tmp/foo
$ git clone /path/to/test
or
$ git clone file:///path/to/test
?

If it fails, try looking at `git fsck`.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: Corrupted repository ?

2010-10-06 Thread Simon Lipp
Le Tue, 5 Oct 2010 11:51:37 -0700 (PDT),
Konstantin Khomoutov  a écrit :

> I'm not sure why later cloning the new repository fails, but I would
> suggest using more sensible approach to putting the repository to
> another machine in the first place:
> 
> $ ssh u...@host
> % mkdir ~/test.git && cd ~/test.git && git init --bare
> % logout
> $ cd test
> $ git remote add foo ssh://u...@host/~/test.git
> $ git push --mirror foo

Doesn’t change anything : on my local machine, after creating the
remote repository with your method :

$ git clone ssh://u...@host/~/test.git
remote: Generating pack...
remote: Done counting 10171 objects.
remote: error: unable to find 719d3089ebb11eba608b13070c4e35be5e3969d6
remote: fatal: unable to get type of object
719d3089ebb11eba608b13070c4e35be5e3969d6 error: git-upload-pack:
git-pack-objects died with error. fatal: git-upload-pack: aborting due
to possible repository corruption on the remote side. remote: aborting
due to possible repository corruption on the remote side. fatal:
protocol error: bad pack header

Note that git push --mirror indicated “Counting objects: *10170*,
done” (not 10171). 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: Behind Proxy and Getting HTTP code = 417

2010-10-06 Thread James Fang
maybe some script sit between git and the proxy, just strip off all
the "Expect" header?
is there such kind of utility program out of box?

Thanks,

On Oct 7, 12:22 am, James Fang  wrote:
> our company provide internet access for us using proxy,
> but after configured http.proxy, i am keeping get HTTP code 417
>
> After a little google, i guess it's because the libcurl that git
> use sent the "Expect: 100-continue" header, which the proxy(i guess a
> Squid)
> does not understand and reply with 417: Expection failed.
>
> I can not change the proxy setting, so below are my questions:
> 1) can i disable the Expect header of libcurl?
>    i know i can use -H option of curl(the binary), but seems git/
> libcurl does not
>    support this option.
> 2) or how can i get around this problem without do anything with the
> proxy ?
>
> Thanks in advance,

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Behind Proxy and Getting HTTP code = 417

2010-10-06 Thread James Fang
our company provide internet access for us using proxy,
but after configured http.proxy, i am keeping get HTTP code 417

After a little google, i guess it's because the libcurl that git
use sent the "Expect: 100-continue" header, which the proxy(i guess a
Squid)
does not understand and reply with 417: Expection failed.

I can not change the proxy setting, so below are my questions:
1) can i disable the Expect header of libcurl?
   i know i can use -H option of curl(the binary), but seems git/
libcurl does not
   support this option.
2) or how can i get around this problem without do anything with the
proxy ?

Thanks in advance,

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.