Show More
@@ -397,7 +397,7 b' class GitRemote(object):' | |||||
397 | return commit.id |
|
397 | return commit.id | |
398 |
|
398 | |||
399 | @reraise_safe_exceptions |
|
399 | @reraise_safe_exceptions | |
400 | def pull(self, wire, url, apply_refs=True, refs=None): |
|
400 | def pull(self, wire, url, apply_refs=True, refs=None, update_after=False): | |
401 | if url != 'default' and '://' not in url: |
|
401 | if url != 'default' and '://' not in url: | |
402 | client = LocalGitClient(url) |
|
402 | client = LocalGitClient(url) | |
403 | else: |
|
403 | else: | |
@@ -438,11 +438,15 b' class GitRemote(object):' | |||||
438 | continue |
|
438 | continue | |
439 | repo[k] = remote_refs[k] |
|
439 | repo[k] = remote_refs[k] | |
440 |
|
440 | |||
441 | if refs: |
|
441 | if refs and not update_after: | |
442 | # mikhail: explicitly set the head to the last ref. |
|
442 | # mikhail: explicitly set the head to the last ref. | |
443 | repo['HEAD'] = remote_refs[refs[-1]] |
|
443 | repo['HEAD'] = remote_refs[refs[-1]] | |
444 |
|
444 | |||
445 | else: |
|
445 | if update_after: | |
|
446 | # we want to checkout HEAD | |||
|
447 | repo["HEAD"] = remote_refs["HEAD"] | |||
|
448 | index.build_index_from_tree(repo.path, repo.index_path(), | |||
|
449 | repo.object_store, repo["HEAD"].tree) | |||
446 |
|
|
450 | return remote_refs | |
447 |
|
451 | |||
448 | @reraise_safe_exceptions |
|
452 | @reraise_safe_exceptions |
General Comments 0
You need to be logged in to leave comments.
Login now