progit2 icon indicating copy to clipboard operation
progit2 copied to clipboard

Customizing-Git-An-Example-Git-Enforced-Policy need remark

Open ivanbogomoloff opened this issue 6 years ago • 1 comments

Here https://git-scm.com/book/en/v2/Customizing-Git-An-Example-Git-Enforced-Policy

I think it must contain remark about git hook update when it is new branch. oldrev will be 0 and hook will not work. And all commits will be passed.

missed_revs = `git rev-list #{$oldrev}..#{$newrev}`.split("\n")

https://stackoverflow.com/questions/3511057/git-receive-update-hooks-and-new-branches look at "right answer"

ivanbogomoloff avatar Apr 26 '18 11:04 ivanbogomoloff

Ooh, nice. If you have a handle on how this could be resolved, do you want to submit a PR?

ben avatar Apr 26 '18 17:04 ben