Repository layout detection

Signed-off-by: Hugues Chabot <hugues.chabot@gmail.com>
Pass all required query parameters when attaching to an existing branch