diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-12-26 12:57:33 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-12-26 12:57:33 +0100 |
commit | e4e03b3bf91db3a6fe8acdcf97603240e9bf7896 (patch) | |
tree | 437fa98632240f137883914c4fdd54b0b283d883 | |
parent | 3da41fa5dde944cd00171d384ce30c20fbb0c5a0 (diff) |
strip suffix .git used typically for bare repos
-rw-r--r-- | urmoms.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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", |