Joey Hess wrote:
> with the old ref I saw on the remote. If the shas are different, I 
> check `git log --oneline $old..$src` -- if this outputs nothing, then
> history is not advancing and it refuses to push that ref, and 
> reports the error to git.

That's not quite right, because git log outputs commits when the two
refs are diverged but share a common ancestor.

I think the best way to detect it is
git merge-base --ancestor $old $src
which will exit nonzero on a non-fast-forward.

-- 
see shy jo

Attachment: signature.asc
Description: PGP signature

Reply via email to