zim-wiki team mailing list archive
Mailing list archive
Re: Bugs in git plugin
If I understand correctly you have a notebook in ~/Zim and both ~/
*and ~/Zim are git repositories.
Then you remove the .git of ~/Zim. As a result zim considers ~/Zim
part of the ~/ repository. Correct ?
So far this is not a bug but the intended behavior. For example I
often use zim to maintain documentation of a software project. In that
case my repository is in ~/code/project and the notebook is in
~/code/project/data/manual. When I modify somthing in zim, it should
add those changes to the repository in ~/code/project.
So I disagree that it should only look for a .git in the notebook
folder itself. However I do think it is valid to say that zim should
only add files in the notebook folder itself. (Does git allow "git add
-A ~/Zim" to only add a subtree ?) In your case this would still have
added the zim notebook to your home ~/.git -- is that what you wanted
On Wed, Apr 24, 2013 at 2:14 AM, Adam Porter <adam@xxxxxxxxxxxxx> wrote:
> 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@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help : https://help.launchpad.net/ListHelp