Re: [Zim-wiki] Bugs in git plugin

2014-08-30 Thread Jaap Karssenberg
Believe this to be fixed in rev716

Regards,

Jaap


On Mon, Jul 1, 2013 at 3:57 AM, Adam Porter a...@alphapapa.net wrote:

 Hi Jaap,

 Sorry I didn't reply for so long.

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

___
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


Re: [Zim-wiki] Bugs in git plugin

2013-04-24 Thread Jaap Karssenberg
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
?

Regards,

Jaap



On Wed, Apr 24, 2013 at 2:14 AM, Adam Porter a...@alphapapa.net 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
 ~/Zim/.git

 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
 again.

 ___
 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

___
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


[Zim-wiki] Bugs in git plugin

2013-04-23 Thread Adam Porter
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
~/Zim/.git

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
again.

___
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