git-query
git data extraction tool using c and libgit2
git clone https://9o.is/git/git-query.git
commit f1aed9fddf92a994d1abebe8ac9b694d4e179fb8 parent 92d74f9656a01ffdb5ff9a453c7b33f6fcac3b26 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 26 Dec 2015 12:57:33 +0100 strip suffix .git used typically for bare repos Diffstat:
| M | urmoms.c | | | 3 | +++ |
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git 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",