]> source.dussan.org Git - jgit.git/commit
UploadPack: configure RequestPolicy with TransportConfig 99/13899/7
authorDave Borowitz <dborowitz@google.com>
Tue, 18 Jun 2013 22:31:17 +0000 (15:31 -0700)
committerDave Borowitz <dborowitz@google.com>
Wed, 3 Jul 2013 22:09:55 +0000 (15:09 -0700)
commite599af19002bfce471a6ad278125c73c07e9d559
tree04631cb9a7db581604f3cf410e6cd1a202870038
parentb4b84a84bd38eb88710e45a41fff2a8884dc2eb2
UploadPack: configure RequestPolicy with TransportConfig

C git 1.8.2 supports setting the equivalent of RequestPolicy.TIP with
uploadpack.allowtipsha1. Parse this into TransportConfig and use it
from UploadPack. An explicitly set RequestPolicy overrides the config,
and the policy may still be upgraded on a unidirectional connection to
avoid races.

Defer figuring out the effective RequestPolicy to later in the
process. This is a minor semantic change to fix a bug: previously,
calling setRequestPolicy(ADVERTISED) _after_ calling
setBiDirectionalPipe(true) would have reintroduced the race condition
otherwise fixed by 01888db892aa9590862d886c01f3b293140db153.

Change-Id: I264e028a76574434cecb34904d9f5944b290df78
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java