aboutsummaryrefslogtreecommitdiffstats
path: root/_posts
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2020-12-07 15:54:16 +0300
committerla-ninpre <leobrekalini@gmail.com>2020-12-07 15:54:16 +0300
commitfec80dcc6e250ceeaa78f1444dd8c021df2e487c (patch)
treed66080e7a8c9d417937026154c0147cb8e7a1742 /_posts
parent7171daaae6bce48163b630711dc00875467c98c3 (diff)
downloadaaoth.xyz-fec80dcc6e250ceeaa78f1444dd8c021df2e487c.tar.gz
aaoth.xyz-fec80dcc6e250ceeaa78f1444dd8c021df2e487c.zip
update fossil export post
tested that sed cmd, and it was not perfect, so i polished it a bit. also add post excerpt functionality.
Diffstat (limited to '_posts')
-rw-r--r--_posts/2020-12-06-fossil-to-git.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/_posts/2020-12-06-fossil-to-git.md b/_posts/2020-12-06-fossil-to-git.md
index c32e2da..651e661 100644
--- a/_posts/2020-12-06-fossil-to-git.md
+++ b/_posts/2020-12-06-fossil-to-git.md
@@ -2,6 +2,7 @@
title: fossil export to git
author: la-ninpre
tags: [fossil, git, tutorial]
+excerpt_separator: <!--more-->
---
i was trying to export my website repo to fossil using suggested method from
@@ -15,6 +16,8 @@ git fast-export --all | fossil import --git repo.fossil
but i didn't like that fossil recognizes my email as username and so commit
messages user was `user@example.com` instead of `user`.
+<!--more-->
+
i then read a bit about options of `git fast-export` and found `--anonymize`
flag. but it's results weren't satisfying either.
@@ -49,3 +52,17 @@ author user <user>
```
which is odd, but fine for fossil import.
+
+---
+
+update: i tested this on a bigger repo with older history and found that this
+regexp was not perfect, i updated it to handle situations like
+`user@example.co.uk` and also names that consist of more than one word.
+
+```
+git fast-export --all | \
+ sed -E 's/^((author)|(committer))[[:blank:]]+([[:graph:]]+([[:blank:]]+[[:graph:]]+)*)[[:blank:]]+(<[[:graph:]]+@[[:graph:]]+(\.[[:graph:]]+)+>)/\1 \4<\4>/' | \
+ fossil import --git repo.fossil
+```
+
+it's veery evil looking horrible thing, but it works.