GetInfoRefs on bare repository

46 views
Skip to first unread message

stefan.sedich

unread,
Apr 12, 2011, 1:56:05 AM4/12/11
to GitSharp
Hi,

Trying to do this on a bare repository:

using (var repo = Repository.Open(path))
{
var pack = new ReceivePack(repo);
pack.SendAdvertisedRefs(new
RefAdvertiser.PacketLineOutRefAdvertiser(new
PacketLineOut(Response.OutputStream)));
}

where path is the path to c:\git\test.git which is a bare repository,
the error I am getting is: "Unknown repository format ""; expected
"0"."

If I use a non bare repository it is ok, only seems to happen on my
bare repositories.



Thanks
Stefan

Meinrad Recheis

unread,
Apr 12, 2011, 9:58:01 AM4/12/11
to gits...@googlegroups.com
Hi,
Is the error thrown in a class in namespace GitSharp.Core or in a class in namespace GitSharp ?

You might need to dig into that class and fix support for bare repos.
-- henon


--
For infos about GitSharp visit http://www.eqqon.com/index.php/GitSharp
To join this group visit http://groups.google.com/group/gitsharp

Stefan Sedich

unread,
Apr 12, 2011, 5:14:02 PM4/12/11
to gits...@googlegroups.com
I worked it out in the end, I didn't add a reference to "Winterdom.IO.FileMap.dll" after I added this it worked fine, I would have expected another error, am I correct here?



Thanks
Stefan
--
Stefan Sedich
Software Developer
http://weblogs.asp.net/stefansedich

stefan.sedich

unread,
Apr 12, 2011, 7:53:46 PM4/12/11
to GitSharp
It seems I forgot Tamir.SharpSSH.dll without that it fails, adding it
works fine.


Thanks

On Apr 12, 11:58 pm, Meinrad Recheis <meinrad.rech...@gmail.com>
wrote:
> Hi,
> Is the error thrown in a class in namespace GitSharp.Core or in a class in
> namespace GitSharp ?
>
> You might need to dig into that class and fix support for bare repos.
> -- henon
>
> On Tue, Apr 12, 2011 at 7:56 AM, stefan.sedich <stefan.sed...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > Trying to do this on a bare repository:
>
> >  using (var repo = Repository.Open(path))
> >            {
> >                var pack = new ReceivePack(repo);
> >                pack.SendAdvertisedRefs(new
> > RefAdvertiser.PacketLineOutRefAdvertiser(new
> > PacketLineOut(Response.OutputStream)));
> >            }
>
> > where path is the path to c:\git\test.git which is a bare repository,
> > the error I am getting is: "Unknown repository format ""; expected
> > "0"."
>
> > If I use a non bare repository it is ok, only seems to happen on my
> > bare repositories.
>
> > Thanks
> > Stefan
>
> > --
> > For infos about GitSharp visithttp://www.eqqon.com/index.php/GitSharp

Gaurav Shah

unread,
Apr 13, 2011, 3:06:58 AM4/13/11
to gits...@googlegroups.com, Stefan Sedich

Yes. You are correct. I faced the same issue.
Reply all
Reply to author
Forward
0 new messages