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>
changes/35/2211635/2
Richard He 5 years ago committed by LUCI CQ
parent 74f67e29f7
commit 42033b2c6a

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

Loading…
Cancel
Save