aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs
diff options
context:
space:
mode:
authorhttps://id.koumbit.net/anarcat <https://id.koumbit.net/anarcat@web>2015-03-30 20:34:28 -0400
committeradmin <admin@branchable.com>2015-03-30 20:34:28 -0400
commitf1d7392869ebf089d466eb4ff8c8b89d82e039e8 (patch)
treef163c7a3aa34dc3314dcffc3f419f9a64b232b75 /doc/bugs
parent121e9132f3df48780f62beb1c95a348a3626fb24 (diff)
downloadikiwiki-f1d7392869ebf089d466eb4ff8c8b89d82e039e8.tar
ikiwiki-f1d7392869ebf089d466eb4ff8c8b89d82e039e8.tar.gz
small bug
Diffstat (limited to 'doc/bugs')
-rw-r--r--doc/bugs/ikiwiki_explodes_when_git_rewrites_history.mdwn17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/bugs/ikiwiki_explodes_when_git_rewrites_history.mdwn b/doc/bugs/ikiwiki_explodes_when_git_rewrites_history.mdwn
new file mode 100644
index 000000000..0e67bfb47
--- /dev/null
+++ b/doc/bugs/ikiwiki_explodes_when_git_rewrites_history.mdwn
@@ -0,0 +1,17 @@
+Now I know it's "bad" to rewrite history in git, but sometimes, and especially with public sites such as a wiki, if confidential information gets transmitted in the wiki, it can be pretty important to remove it, and the only way to do this on a public git repo is by rewriting history.
+
+(This happened as part of my implementation of [[todo/git-annex support]] to be honest, but i think it applies to other situations as well.)
+
+The problem is that ikiwiki keeps track of the last commit it saw in `$srcdir/.ikiwiki/indexdb`. Then it uses this to infer which files changed. If history changed, this will fail with a fairly dramatic:
+
+<pre>
+Error: 'git log --pretty=raw --raw --abbrev=40 --always -c --no-renames --reverse -r f9330f40527ba1f7df6656490cacb9d5ae9e2cd6..HEAD -- .' failed:
+</pre>
+
+Notice how the error message from git isn't present. It's in the `error.log`:
+
+<pre>
+[Mon Mar 30 20:20:04.393466 2015] [cgi:error] [pid 21463] [client 2001:1928:1:9::1:54315] AH01215: fatal: Invalid revision range f9330f40527ba1f7df6656490cacb9d5ae9e2cd6, referer: http://anarc.at/ikiwiki.cgi?do=edit&page=services%2Fwiki
+</pre>
+
+The workaround I have found was to remove the `indexdb` file, because that's [[apparently legit|tips/inside_dot_ikiwiki/]]. But it would be nice to have (1) a proper error message (it had to dig around the error.log to understand what's going on), (2) to have a proper fallback if the `git log` fails and (3) to recover with the newer commit ID when we fallback. --[[anarcat]]