commit - 97268afcc9ee0f127c73d1032592b2c495492587
commit + 654766c3806211c638a82415ea4cbfcc65b39129
blob - f76ec4a1783d611d79869b9310c21a8a09457b24
blob + 699864caa0e476d41beda09a4b630442422bd036
--- dulwich/porcelain.py
+++ dulwich/porcelain.py
return sorted(r.open_index())
+def find_unique_abbrev(object_store, object_id):
+ """For now, just return 7 characters."""
+ # TODO(jelmer): Add some logic here to return a number of characters that
+ # scales relative with the size of the repository
+ return object_id.decode("ascii")[:7]
+
+
def describe(repo):
"""Describe the repository version.
# If there are no tags, return the current commit
if len(sorted_tags) == 0:
- return "g{}".format(r[r.head()].id.decode("ascii")[:7])
+ return "g{}".format(find_unique_abbrev(r.object_store, r[r.head()].id))
# We're now 0 commits from the top
commit_count = 0
blob - 4d8177fc36e4b011df20e44ae387cdc9b50ec33e
blob + a838c1e971cd9c6f8916e4fe6ad026845900aaa5
--- releaser.conf
+++ releaser.conf
timeout_days: 5
tag_name: "dulwich-$VERSION"
verify_command: "flake8 && make check"
+github_url: "https://github.com/dulwich/dulwich"
update_version {
path: "setup.py"
match: "^dulwich_version_string = '(.*)'$"