commit: 7e717cbf74bf22d0240cb2ed84a31d15e64e98d9
parent df2162e91d9a6ce920dab81d3ebc4d662e7afe95
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 1 Oct 2020 23:48:21 +0200
stagit-index: Add support for git-repo in subdirs
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/stagit-index.c b/stagit-index.c
@@ -220,9 +220,11 @@ main(int argc, char *argv[])
continue;
}
- /* use directory name as name */
- if ((name = strrchr(repodirabs, '/')))
- name++;
+ /* Remove CWD and use as name */
+ char buf[256];
+ name = repodirabs;
+ if(NULL != getcwd(buf, 256))
+ name += strlen(buf) + 1;
else
name = "";