From e4e03b3bf91db3a6fe8acdcf97603240e9bf7896 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sat, 26 Dec 2015 12:57:33 +0100 Subject: [PATCH] strip suffix .git used typically for bare repos --- urmoms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/urmoms.c b/urmoms.c index 9391de6..301d0e1 100644 --- a/urmoms.c +++ b/urmoms.c @@ -791,6 +791,9 @@ main(int argc, char *argv[]) p = xbasename(repodir); snprintf(name, sizeof(name), "%s", p); free(p); + /* remove .git suffix, typically used by bare repos */ + if ((p = strstr(name, ".git"))) + *p = '\0'; /* read description or .git/description */ snprintf(path, sizeof(path), "%s%s%s", -- libgit2 1.1.1