Skip to content

Instantly share code, notes, and snippets.

@robwiss
Created December 6, 2016 21:08
Show Gist options
  • Save robwiss/78777fe1aefbdb8debf84dcbe618c14c to your computer and use it in GitHub Desktop.
Save robwiss/78777fe1aefbdb8debf84dcbe618c14c to your computer and use it in GitHub Desktop.
diff --git a/src/Controller/TreeController.php b/src/Controller/TreeController.php
index d3d9fe6..3686de4 100644
--- a/src/Controller/TreeController.php
+++ b/src/Controller/TreeController.php
@@ -34,6 +34,7 @@ class TreeController implements ControllerProviderInterface
return $app['twig']->render('tree.twig', array(
'files' => $files->output(),
+ 'repo_path' => $repository->getPath(),
'repo' => $repo,
'branch' => $branch,
'path' => $tree ? $tree . '/' : $tree,
diff --git a/themes/bootstrap3/twig/tree.twig b/themes/bootstrap3/twig/tree.twig
index b0debfb..8870d54 100644
--- a/themes/bootstrap3/twig/tree.twig
+++ b/themes/bootstrap3/twig/tree.twig
@@ -32,7 +32,7 @@
{% endif %}
</div><br />
{% if app.show_ssh_remote %}
- <input type="text" class="form-control{{ app.show_ssh_remote ? ' visible' }}" id="clone-input-ssh" value="git clone {{ app.ssh_user }}@{{ app.request.host }}:{{ repo }}">
+ <input type="text" class="form-control{{ app.show_ssh_remote ? ' visible' }}" id="clone-input-ssh" value="git clone {{ app.ssh_user }}@{{ app.request.host }}:{{ repo_path }}">
{% endif %}
{% if app.show_http_remote %}
<input type="text" class="form-control{{ app.show_ssh_remote is empty and app.show_http_remote ? ' visible' }}" id="clone-input-http" value="git clone http{{ app.use_https ? 's' }}://{{ app.http_user }}{{ app.http_user ? '@' }}{{ app.request.host }}/{{ app.url_subdir }}{{ repo }}">
diff --git a/themes/default/twig/tree.twig b/themes/default/twig/tree.twig
index 2428cd2..20da70f 100644
--- a/themes/default/twig/tree.twig
+++ b/themes/default/twig/tree.twig
@@ -30,7 +30,7 @@
{% endif %}
</div><br />
{% if app.show_ssh_remote %}
- <input type="text" class="form-control{{ app.show_ssh_remote ? ' visible' }}" id="clone-input-ssh" value="git clone {{ app.ssh_user }}@{{ app.request.host }}:{{ repo }}">
+ <input type="text" class="form-control{{ app.show_ssh_remote ? ' visible' }}" id="clone-input-ssh" value="git clone {{ app.ssh_user }}@{{ app.request.host }}:{{ repo_path }}">
{% endif %}
{% if app.show_http_remote %}
<input type="text" class="form-control{{ app.show_ssh_remote is empty and app.show_http_remote ? ' visible' }}" id="clone-input-http" value="git clone http{{ app.use_https ? 's' }}://{{ app.http_user }}{{ app.http_user ? '@' }}{{ app.request.host }}/{{ app.url_subdir }}{{ repo }}">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment