diff options
author | Carl Worth <cworth@cworth.org> | 2013-12-12 20:28:02 -0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-01-29 17:57:17 +0800 |
commit | 26d551a1ee9e888c1656730c19414003124a4ec7 (patch) | |
tree | 363d0a05001fd35de9597e47c6291253f61618ee /tools | |
parent | bbae39da3b36c86a91d709ff169c4dd8b26f9284 (diff) | |
download | patchwork-26d551a1ee9e888c1656730c19414003124a4ec7.tar patchwork-26d551a1ee9e888c1656730c19414003124a4ec7.tar.gz |
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>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/post-receive.hook | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/post-receive.hook b/tools/post-receive.hook index 4f76fa6..4fb741d 100755 --- a/tools/post-receive.hook +++ b/tools/post-receive.hook @@ -67,6 +67,6 @@ while read oldrev newrev refname; do fi done if [ $found -eq 0 ]; then - echo "E: no mapping for refname $key" >&2 + echo "E: STATE_MAP has no mapping for branch $refname" >&2 fi done |