git-query
git data extraction tool using c and libgit2
git clone https://9o.is/git/git-query.git
commit 6775299c2b8a4e262c01f8fd297104439431732b parent 5e495b0f011a395d824ff012f9bc2348e6669265 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 29 May 2016 13:06:32 +0200 improve example: strip .git suffix stagit-index and stagit strip the .git suffix so also strip it from the directory for the possible www root. Thanks to ng0 for reporting it! Diffstat:
| M | example.sh | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/example.sh b/example.sh @@ -22,12 +22,13 @@ find . -maxdepth 1 -type d | grep -v "^.$" | sort | xargs stagit-index > "${curd # make files per repo. cd "${reposdir}" find . -maxdepth 1 -type d | grep -v "^.$" | sort | while read -r dir; do - d=$(basename "${dir}") + r=$(basename "${dir}") + d=$(basename "${dir}" ".git") printf "%s... " "${d}" mkdir -p "${curdir}/${d}" cd "${curdir}/${d}" - stagit -c ".cache" "${reposdir}/${d}" + stagit -c ".cache" "${reposdir}/${r}" # symlinks ln -sf log.html index.html