hggit: use transaction name to test initial clone

Summary:
"[paths] being empty" will no longer be a way to test initial clone, use
transaction name instead.

Reviewed By: DurhamG

Differential Revision: D21011395

fbshipit-source-id: e257fe8eb2efd45ac52fad7c74363151b0a8c417
This commit is contained in:
Jun Wu 2020-05-12 10:20:16 -07:00 committed by Facebook GitHub Bot
parent 63872cfbae
commit d175b5c489

View File

@ -308,7 +308,7 @@ class GitHandler(object):
if remote_name:
self.update_remote_branches(remote_name, refs)
elif not self.paths:
elif getattr(self.repo.currenttransaction(), "desc", None) == "clone":
# intial cloning
self.update_remote_branches("default", refs)