I think I can best explain this by just showing how to reproduce it:

1.  Make a git repo in ~/Zim
2.  Turn on the plugin.
3.  Make some commits to ~/Zim/.git
4.  Make a git repo in ~ (i.e. ~/.git is where it will be stored).
5.  Quit Zim.
6.  Move ~/Zim/.git to /tmp (I had a good reason for doing this which
is unrelated to this bug)
7.  Start Zim.
8.  Watch as Zim runs 'git add -A'.  Git will look up the directory
tree until it finds ~/.git and will run 'git add -A' there, adding the
entire home directory to the repository in ~/.git.
9.  Figure this out by running 'lsof | grep git' to find out why git
is running and running and running without end.
10.  Kill git.
11.  Move /tmp/.git back to ~/Zim
12.  Do some stuff in Zim.
13.  Watch git go bonkers again adding everything in the home
directory to ~/.git.
14.  Kill git.
15.  Kill Zim.
16.  cd ~; git rm --cached blahblah; git rebase -i blahblah; to remove
all the stuff I didn't want in ~/.git
17.  Run Zim again, and watch it behave properly, only adding ~/Zim to

So there are two bugs:

1.  If there is no .git directory in the Zim document root, the plugin
should not run 'git add -A' or anything else.  It should only give a
warning or offer to make a new repository.
2.  The plugin should check for the existence of a .git directory in
the document root every time it wants to commit anything.  Somehow it
was running it git in ~ instead of in ~/Zim even after I moved the
repo back into ~/Zim.  I had to restart Zim to make it use ~/Zim/.git

Mailing list: https://launchpad.net/~zim-wiki
Post to     : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp

Reply via email to