ericpaulbishop/redmine_git_hosting — Issue #122: /sub-sub-sub-project gets renamed to /project somehow
Author: Jehreg
Created: 2011-11-18 15:43:49+00:00
State: open

The admin goes to check the Project settings and saves the page.
One second later the following appears in the auth.log:
```
Nov 16 08:42:28 redmine sshd[12348]: Accepted publickey for git from 198.103.103.169 port 55905 ssh2
Nov 16 08:42:28 redmine sshd[12348]: pam_unix(sshd:session): session opened for user git by (uid=0)
Nov 16 08:42:29 redmine sshd[12359]: Received disconnect from 198.103.103.169: 11: disconnected by user
Nov 16 08:42:29 redmine sshd[12348]: pam_unix(sshd:session): session closed for user git
Nov 16 08:42:29 redmine sudo: chili : TTY=unknown ; PWD=/var/www/rails_apps/chili ; USER=git ; COMMAND=/bin/bash -c eval test -r ~/.gitolite/hooks/common/post-receive
Nov 16 08:42:29 redmine sudo: chili : TTY=unknown ; PWD=/var/www/rails_apps/chili ; USER=git ; COMMAND=/bin/bash -c eval bash
Nov 16 08:42:29 redmine sudo: chili : TTY=unknown ; PWD=/var/www/rails_apps/chili ; USER=git ; COMMAND=/bin/bash -c eval cat ~/.gitolite/hooks/common/post-receive
Nov 16 08:42:29 redmine sshd[12387]: Accepted publickey for git from 198.103.103.169 port 55907 ssh2
Nov 16 08:42:29 redmine sshd[12387]: pam_unix(sshd:session): session opened for user git by (uid=0)
Nov 16 08:42:29 redmine sshd[12398]: Received disconnect from 198.103.103.169: 11: disconnected by user
Nov 16 08:42:29 redmine sshd[12387]: pam_unix(sshd:session): session closed for user git
Nov 16 08:42:29 redmine sudo: chili : TTY=unknown ; PWD=/var/www/rails_apps/chili ; USER=git ; COMMAND=/bin/bash -c eval mkdir -p "repositories/gcwwwdrupal-git.git"
Nov 16 08:42:29 redmine sudo: chili : TTY=unknown ; PWD=/var/www/rails_apps/chili ; USER=git ; COMMAND=/bin/bash -c eval rmdir "repositories/gcwwwdrupal-git.git"
Nov 16 08:42:29 redmine sudo: chili : TTY=unknown ; PWD=/var/www/rails_apps/chili ; USER=git ; COMMAND=/bin/bash -c eval mv "repositories/gcwwwtemplates/gcwwwvar/gcwwwdrupal/gcwwwdrupal-git.git" "repositories/gcwwwdrupal-git.git"
```

So, somehow, the function update_git_repo_for_new_parent in ./lib/git_hosting/patches/projects_controller_patch.rb gets called even when the project parent doesn't get changed.

This is plugin commit 1101f5d and Chili commit b43bf18

Anyone else seen this ? Anyone else using sub-projects that are at least 2 deep ?