This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Pushing a git note fails.
- From: Kalle Olavi Niemitalo <kon at iki dot fi>
- To: libc-alpha <libc-alpha at sourceware dot org>
- Date: Sun, 07 Apr 2013 11:18:05 +0300
- Subject: Re: Pushing a git note fails.
- References: <51604CF5 dot 3010707 at redhat dot com> <87vc7z61nk dot fsf at rho dot meyering dot net> <516058D7 dot 60500 at redhat dot com> <87hajj5inm dot fsf at rho dot meyering dot net>
Jim Meyering <jim@meyering.net> writes:
> + refs/notes/*,delete)
> + # delete note
> + if [ "$allowdeletenote" != "true" ]; then
> + echo '*** Deleting a note is not allowed' \
> + 'in this repository' >&2
> + exit 1
> + fi
> + ;;
That will trigger only when someone is trying to delete an entire
notes namespace, like refs/notes/commits. Deleting a note within
the namespace does not mean deleting the ref and therefore would
not cause this code to run. refs/notes/commits normally refers
to a commit object whose tree contains one blob for each note.
Deleting notes from there just adds another commit object with a
smaller tree; the previous notes remain in the commit history.
Thus, edits and deletions of notes can and should be fast-forward
pushed.
(It is apparently possible to make a ref in refs/notes/* refer
directly to a tree, rather than to a commit; but I don't think
you want to do that in glibc.git.)