瀏覽代碼

Fix gclient-new-workdir when source repo is shallow clone

When source repo is a 'shallow clone', `.git/shallow` is not linked to
the new workdir. Which makes running git command fails in new workdir.

Change-Id: I81d38b7b2cccc482711dcc1dd02ea06fbd01a56d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2211635
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Richard He <linyhe@microsoft.com>
Richard He 5 年之前
父節點
當前提交
42033b2c6a
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      git_common.py

+ 1 - 0
git_common.py

@@ -1083,6 +1083,7 @@ def make_workdir(repository, new_workdir):
     'refs',
     'refs',
     'remotes',
     'remotes',
     'rr-cache',
     'rr-cache',
+    'shallow',
   ]
   ]
   make_workdir_common(repository, new_workdir, GIT_DIRECTORY_WHITELIST,
   make_workdir_common(repository, new_workdir, GIT_DIRECTORY_WHITELIST,
                       ['HEAD'])
                       ['HEAD'])