Hi there,
I have a piece of code that looks like this:
obj = self._repo[hex_sha1]
print obj.read_raw
type, data = self._repo.read(hex_sha1)
..
which runs OK, printing
<pygit2.Blob object at 0xf754e440>
When I remove the lookup
obj = self._repo[hex_sha1]
the same code prints
[stack trace]
type, data = self._repo.read(hex_sha1)
GitError: 6da8b6ef5f7f8d8c160c03e6ff2f57b40812214c: Failed to read
object. Ambiguous sha1 prefix
is this expected? Any ideas?
(I'm sorry I can't share actual code; this is happening inside a
proprietary program.)
I'm on 0.16.
--
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Hey Han-Wen, I think this is the kind of issue that can be very aptly discussed in the pygit2 issues tracker [0] instead of the mailing list. Go for it! [0]: https://github.com/libgit2/pygit2/issues On Fri, Mar 9, 2012 at 11:26 PM, Han-Wen Nienhuys <hanwenn@gmail.com> wrote: > Hi there, > > I have a piece of code that looks like this: > > > obj = self._repo[hex_sha1] > print obj.read_raw > type, data = self._repo.read(hex_sha1) > .. > which runs OK, printing > > <pygit2.Blob object at 0xf754e440> > > > When I remove the lookup > > obj = self._repo[hex_sha1] > > the same code prints > > [stack trace] > type, data = self._repo.read(hex_sha1) > GitError: 6da8b6ef5f7f8d8c160c03e6ff2f57b40812214c: Failed to read > object. Ambiguous sha1 prefix > > > is this expected? Any ideas? > > (I'm sorry I can't share actual code; this is happening inside a > proprietary program.) > > I'm on 0.16. > > -- > Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
On Fri, Mar 9, 2012 at 7:56 PM, Vicent Marti <vicent@github.com> wrote: > Hey Han-Wen, > > I think this is the kind of issue that can be very aptly discussed in > the pygit2 issues tracker [0] instead of the mailing list. Is it a problem to discuss on the list, though? -- Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
On Fri, 9 Mar 2012 20:10:24 -0300 Han-Wen Nienhuys <hanwenn@gmail.com> wrote: > On Fri, Mar 9, 2012 at 7:56 PM, Vicent Marti <vicent@github.com> > wrote: > > Hey Han-Wen, > > > > I think this is the kind of issue that can be very aptly discussed > > in the pygit2 issues tracker [0] instead of the mailing list. > > Is it a problem to discuss on the list, though? > The risk is that, if the issue is not quickly fixed, it will likely be forgotten. At some point I will remove the emails from inbox, and bye bye... until someone else raises it again. In the issue tracker an issue may remain open for ages, but it will not be forgotten. -- J. David Ibáñez Itaapy <http://www.itaapy.com> Tel +33 (0)1 42 23 67 45 9 rue Darwin, 75018 Paris Fax +33 (0)1 53 28 27 88