Merge lp:~jelmer/brz/active-refs-only into lp:brz/3.1

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/active-refs-only
Merge into: lp:brz/3.1
Diff against target: 23 lines (+5/-1)
1 file modified
breezy/git/dir.py (+5/-1)
To merge this branch: bzr merge lp:~jelmer/brz/active-refs-only
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+399386@code.launchpad.net

Commit message

Only set git refs that we actually fetched.

Description of the change

Only set git refs that we actually fetched.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/git/dir.py'
2--- breezy/git/dir.py 2021-03-24 01:54:08 +0000
3+++ breezy/git/dir.py 2021-03-24 04:27:43 +0000
4@@ -238,6 +238,7 @@
5 from ..repository import InterRepository
6 from .mapping import default_mapping
7 from ..transport.local import LocalTransport
8+ from .refs import is_peeled
9 if no_tree:
10 format = BareLocalGitControlDirFormat()
11 else:
12@@ -261,7 +262,10 @@
13 (pack_hint, _, refs) = interrepo.fetch_objects(determine_wants,
14 mapping=default_mapping)
15 for name, val in viewitems(refs):
16- target_git_repo.refs[name] = val
17+ if is_peeled(name):
18+ continue
19+ if val in target_git_repo.object_store:
20+ target_git_repo.refs[name] = val
21 result_dir = LocalGitDir(transport, target_git_repo, format)
22 result_branch = result_dir.open_branch()
23 try:

Subscribers

People subscribed via source and target branches