diff options
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -2755,6 +2755,14 @@ class Project: | |||
2755 | # field; it doesn't exist, thus abort the optimization attempt | 2755 | # field; it doesn't exist, thus abort the optimization attempt |
2756 | # and do a full sync. | 2756 | # and do a full sync. |
2757 | break | 2757 | break |
2758 | elif depth and is_sha1 and ret == 1: | ||
2759 | # In sha1 mode, when depth is enabled, syncing the revision | ||
2760 | # from upstream may not work because some servers only allow | ||
2761 | # fetching named refs. Fetching a specific sha1 may result | ||
2762 | # in an error like 'server does not allow request for | ||
2763 | # unadvertised object'. In this case, attempt a full sync | ||
2764 | # without depth. | ||
2765 | break | ||
2758 | elif ret < 0: | 2766 | elif ret < 0: |
2759 | # Git died with a signal, exit immediately. | 2767 | # Git died with a signal, exit immediately. |
2760 | break | 2768 | break |