← Back to team overview

zim-wiki team mailing list archive

Re: Bugs in git plugin

 

Hi Jaap,

Sorry I didn't reply for so long.

On Wed, Apr 24, 2013 at 1:56 AM, Jaap Karssenberg
<jaap.karssenberg@xxxxxxxxx> wrote:
> 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.

This makes sense to me.

> 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
> ?

I'm still a git novice, but as far as I understand from the man page,
"git add -A ~/Zim" would only add files in ~/Zim to the git index.
This definitely needs to be changed in Zim, because Zim should
definitely not commit files which are outside of its own tree.  As my
experience showed, that can cause serious problems.  And also, in the
use case you described, most people probably wouldn't want Zim to
commit unstaged changes in ~/code/project/whatever when it commits
changes in ~/code/project/data/manual.

Thanks for your work on Zim.


Follow ups

References