Refuse to create or delete funny ref names over dumb transports
commit91ffee8dbb7efe8a5aed30cce9b1c4a55f78da6f
authorShawn O. Pearce <spearce@spearce.org>
Tue, 1 Jul 2008 03:04:00 +0000 (30 23:04 -0400)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Tue, 1 Jul 2008 21:10:50 +0000 (1 23:10 +0200)
tree8f6b5ef8b9f08ced192d6589e5516acf724cc02e
parent8dcc596562042b4531b939a9ddeca753d2bcc8b9
Refuse to create or delete funny ref names over dumb transports

If the RemoteRefUpdate requests us to create a remote name of just
"master" (say due to a bug in the push command line tool) we would do
just that, creating "$project.git/master" on the remote side.  This is
not a valid ref for Git and confusion ensues when C Git tries to
operate on the same repository.

Normally these sorts of bad refs are blocked by git-receive-pack
on the remote side, but here we don't have that so we must do the
blocking as part of the push connection.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/transport/WalkPushConnection.java