This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Pushing a git note fails.
- From: Jim Meyering <jim at meyering dot net>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Mike Frysinger <vapier at gentoo dot org>
- Date: Sat, 06 Apr 2013 18:53:51 +0200
- Subject: Re: Pushing a git note fails.
- References: <51604CF5 dot 3010707 at redhat dot com>
Carlos O'Donell wrote:
> Team,
>
> I did a commit, but forgot to update the ChangeLog.
...
>
> This note is a local "commit" namespace note and I need to
> push it up to the server like this:
> ~~~
> [carlos@koi glibc]$ git push origin refs/notes/*
> Counting objects: 3, done.
> Delta compression using up to 4 threads.
> Compressing objects: 100% (3/3), done.
> Writing objects: 100% (3/3), 331 bytes, done.
> Total 3 (delta 0), reused 0 (delta 0)
> remote: *** Update hook: unknown type of update to ref refs/notes/commits of type commit
> remote: error: hook declined to update refs/notes/commits
> To ssh://carlos@sourceware.org/git/glibc.git
> ! [remote rejected] refs/notes/commits -> refs/notes/commits (hook declined)
> error: failed to push some refs to 'ssh://carlos@sourceware.org/git/glibc.git'
> ~~~
>
> But it fails.
>
> It looks like our commit hooks don't allow notes.
What policy would you like with notes?
I've just made this untested change to the git-vc'd
update script that sets such policy. If it's what you'd
like, I'll commit as is. Happy to adjust, too.
diff --git a/update b/update
index ed76bd2..f5385a0 100755
--- a/update
+++ b/update
@@ -171,6 +171,9 @@ case "$refname","$newrev_type" in
exit 1
fi
;;
+ refs/notes/*,*)
+ # Notes: no restrictions.
+ ;;
*)
# Anything else (is there anything else?)
echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2