Git command inside hook fails
===

The following command runs successfully when run from the git bash with my desired results.

git rev-list --no-merges --pretty=oneline $new_ref --not $old_ref refs/heads/built

When I run the same command inside a git update hook, it fails with this error.
fatal: ambiguous argument 'refs/heads/built': both revision and filename
Use '--' to separate filenames from revisions

If I add the '--', I don't get the same results as when I run it from the git bash outside of the hook.

Seems to have problems with the forward slashes.  I've tried escaping them etc...

Any ideas, Thanks!