Remove .git from guessed project name
authorLaurent Bachelier <laurent@bachelier.name>
Wed, 10 Oct 2012 19:02:03 +0000 (21:02 +0200)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 10 Oct 2012 19:27:39 +0000 (15:27 -0400)
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
irkerhook.py

index 755a45129d1440587f8738b1cc50c538757d4920..33d3afdd115be045313bc0d8f327e822d27b411c 100755 (executable)
@@ -226,6 +226,8 @@ class GitExtractor(GenericExtractor):
             while True:
                 if os.path.exists(os.path.join(here, keyfile)):
                     self.project = os.path.basename(here)
+                    if self.project.endswith('.git'):
+                        self.project = self.project[0:-4]
                     break
                 elif here == '/':
                     sys.stderr.write("irkerhook.py: no git repo below root!\n")