]> git.ozlabs.org Git - patchwork/commit
post-receive: Fix error message when pushing to an unmapped branch
authorCarl Worth <cworth@cworth.org>
Fri, 13 Dec 2013 04:28:02 +0000 (20:28 -0800)
committerJeremy Kerr <jk@ozlabs.org>
Wed, 29 Jan 2014 09:57:17 +0000 (17:57 +0800)
commit26d551a1ee9e888c1656730c19414003124a4ec7
tree363d0a05001fd35de9597e47c6291253f61618ee
parentbbae39da3b36c86a91d709ff169c4dd8b26f9284
post-receive: Fix error message when pushing to an unmapped branch

Previously, if STATE_MAP contained only refs/heads/master and a user
pushed to a branch such as refs/heads/stable, the hook emitted a
misleading error message:

E: no mapping for refname refs/heads/master

Fix this by correctly printing the reference being looked for, rather
than the reference most recently found in STATE_MAP. Also, reword the
message slightly to point the user to STATE_MAP and to use an actual
word "branch" instead of the non-word "refname".

Signed-off-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
tools/post-receive.hook