diff options
-rwxr-xr-x | irkerhook.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/irkerhook.py b/irkerhook.py index 5e7651a..1482200 100755 --- a/irkerhook.py +++ b/irkerhook.py @@ -283,6 +283,9 @@ class GitExtractor(GenericExtractor): if not commit.rev: # Query git for the abbreviated hash commit.rev = do("git log -1 '--pretty=format:%h' " + shellquote(commit.commit)) + if self.urlprefix in ('gitweb', 'cgit'): + # Also truncate the commit used for the announced urls + commit.commit = commit.rev # Extract the meta-information for the commit commit.files = do("git diff-tree -r --name-only " + shellquote(commit.commit)) commit.files = " ".join(commit.files.strip().split("\n")[1:]) |