Reviewing merge request #2207: Correct repository path calculation for post-receive hook

The path for the repository was calculated in the post receive hook based on the path to the post-receive hook itself. This can fail when symbolic links and multiple scripts are involved. Instead use Dir.getwd() which should always yield the correct result.

Commits that would be merged:

Version 11
  • Version 1
  • Version 2
  • Version 3
  • Version 4
  • Version 5
  • Version 6
  • Version 7
  • Version 8
  • Version 9
  • Version 10
  • Version 10
  • Version 11
  • 81962ee
  • ce8b2ed
  • Correct repository path calculation for post-receive hook

Showing 81962ee-ce8b2ed

Comments

Rebased to apply cleanly to the current state of Gitorious.

Rebased against current master.

Rebased against current master.

→ State changed from Open to In Review

Are you using this on your server? I just tried running this, and got

"/dev/shm/hoox" # Dir.getwd

"/dev/shm/hoox/.git" # the old code

but it may be my setup?

Pushed new version 11 to apply cleanly vs the latest changes.

Add a new comment:

Login or create an account to post a comment

How to apply this merge request to your repository