You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I init a new repo, and then use the 'repo.create_head('refs/heads/master')'. But I get a gitdb.exc.Badobject:48454144. This will not be an error somehow. But it triped me.
The text was updated successfully, but these errors were encountered:
…more.
Previously, an unresolvable ref name like HEAD would end up as HEX and
was presented as BadObject error, even though that exception is for
invalid shas only.
Now BadName is thrown, which converts into a more useful error message.
Improves #105
What you have been doing was equivalent to git branch master, which fails with fatal: Not a valid object name: 'master'. on the commandline as well.
However, I have added a new test-case to verify gitpython deals with empty repositories gracefully.
In addition to that, the BadObject exception is now a BadName exception, which doesn't convert perfectly nice names to some hex, which would just add to the confusion.
…ng git-python.
This is the case with `git submodule add` as well. This makes sense as
an empty git repository doesn't have a commit, which needs to be specified
as SHA in the parent repositories tree entry for the respective submodule.
When manually adding the empty submodule to the .gitmodules file, git-python
will throw another error related to the inability to find the submodule
in the index.
Even if an iteration would be possible, git-python would now throw
a BadName exception, which clearly indicates that the 'HEAD' revision
is invalid (as it doesn't point to any commit).
Fixes#152Fixes#105
I init a new repo, and then use the 'repo.create_head('refs/heads/master')'. But I get a gitdb.exc.Badobject:48454144. This will not be an error somehow. But it triped me.
The text was updated successfully, but these errors were encountered: