# Regressione superficiale di git fetch in discourse\_docker

**URL:** <https://meta.discourse.org/t/shallow-git-fetch-regression-in-discourse-docker/172324>\
**Category:** Support\
**Created:** [5 Dicembre 2020, 11:24am UTC](https://meta.discourse.org/t/shallow-git-fetch-regression-in-discourse-docker/172324 "2020-12-05T11:24:46Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![dachary](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dachary/32/119731_2.png) [@dachary](https://meta.discourse.org/u/dachary)\
**Post date:** [5 Dicembre 2020, 11:24am UTC](https://meta.discourse.org/t/shallow-git-fetch-regression-in-discourse-docker/172324/1 "2020-12-05T11:24:46Z")

</div>

Buongiorno,

Un [recente commit in docker\_discourse](https://github.com/discourse/discourse_docker/commit/e2eb085714dfcf2aa0117b0f2fdf39b762b0e18d) ha interrotto la possibilità di specificare un tag (ad esempio v2.6.0) nel valore **version:** di **app.yml**. Questa funzionalità è utile per [installare versioni precedenti di Discourse](https://meta.discourse.org/t/how-to-i-can-install-old-version-discourse/115457/6?u=dachary), ad esempio per scopi di test.

Il problema si manifesta nel modo seguente quando si specifica **version: v2.6.0** utilizzando il commit [e2eb085714dfcf2aa0117b0f2fdf39b762b0e18d](https://github.com/discourse/discourse_docker/commit/e2eb085714dfcf2aa0117b0f2fdf39b762b0e18d):

```plaintext
I, [2020-12-05T10:59:38.848743 #1] INFO -- : > cd /var/www/discourse && git remote set-branches origin v2.6.0
I, [2020-12-05T10:59:38.852600 #1] INFO -- : 
I, [2020-12-05T10:59:38.852639 #1] INFO -- : > cd /var/www/discourse && git fetch --depth 1 origin v2.6.0
From https://github.com/discourse/discourse
 * tag v2.6.0 -> FETCH_HEAD
I, [2020-12-05T10:59:41.405163 #1] INFO -- : 
I, [2020-12-05T10:59:41.405307 #1] INFO -- : > cd /var/www/discourse && git checkout v2.6.0
error: pathspec 'v2.6.0' did not match any file(s) known to git
I, [2020-12-05T10:59:41.411796 #1] INFO -- : 

```

Invece dell’output previsto quando si utilizza il commit immediatamente precedente:

```plaintext
I, [2020-12-05T11:22:14.717910 #1] INFO -- : > cd /var/www/discourse && git fetch origin v2.6.0
From https://github.com/discourse/discourse
 * tag v2.6.0 -> FETCH_HEAD
I, [2020-12-05T11:22:15.672616 #1] INFO -- : 
I, [2020-12-05T11:22:15.672683 #1] INFO -- : > cd /var/www/discourse && git checkout v2.6.0
Note: checking out 'v2.6.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at d6121249d3 Version bump to v2.6.0

```

---

_[View the full topic](https://meta.discourse.org/t/shallow-git-fetch-regression-in-discourse-docker/172324)._
