# تراجع ضحل في جلب git في discourse\_docker

**URL:** <https://meta.discourse.org/t/shallow-git-fetch-regression-in-discourse-docker/172324>\
**Category:** Product Support\
**Created:** [5 ديسمبر 2020، 11:24ص 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:** 5

<div class="post-metadata">

**Author:** ![lucasbasquerotto](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lucasbasquerotto/32/133376_2.png) [@lucasbasquerotto](https://meta.discourse.org/u/lucasbasquerotto)\
**Post date:** [7 ديسمبر 2020، 3:37م UTC](https://meta.discourse.org/t/shallow-git-fetch-regression-in-discourse-docker/172324/5 "2020-12-07T15:37:13Z")

</div>

أعتقد أن المشكلة هنا هي أن الوسوم غير معروفة محليًا عند إجراء عملية الاسترجاع، مثل ما ورد في المسألة التالية (غير مرتبطة بـ Discourse):

> <https://stackoverflow.com/questions/35979642/what-is-git-tag-how-to-create-tags-how-to-checkout-git-remote-tags>

يجب أن يؤدي تشغيل `git fetch --all` إلى حل المشكلة، لكنني لا أعرف إلى أي مدى قد يزيد ذلك من حجم الصورة (ما لم يتم مسح المراجع غير المستخدمة لاحقًا بواسطة تعليمات أخرى).

مع ذلك، أعتقد أن الأمر `git clone --depth 1 https://github.com/discourse/discourse.git --branch=$version` سيحل المشكلة، لأن الوسيطة `branch` تقبل كلاً من الفروع والوسوم، لكنني لم أجربها بعد ولا أعرف ما إذا كان هناك سبب لاستخدام الفرع الرئيسي (master) حاليًا في عملية الاستنساخ.

عند تنفيذ الأمر `git clone --depth 1 https://github.com/discourse/discourse.git --branch=v2.6.0`، يكون حجم المجلد بالكامل `212 ميجابايت`، بينما يبلغ حجم مجلد `.git` بداخله `46 ميجابايت`، لذا أعتقد أن هذا مقبول.

---

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