Dulwich.io dulwich / b75abc3
Small improvements for DictRefsContainer. Jelmer Vernooń≥ 11 days ago
1 changed file(s) with 5 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
414414 def set_symbolic_ref(self, name, other, committer=None,
415415 timestamp=None, timezone=None, message=None):
416416 old = self.follow(name)[-1]
417 self._refs[name] = SYMREF + other
418 self._log(name, old, old, committer=committer, timestamp=timestamp,
417 new = SYMREF + other
418 self._refs[name] = new
419 self._log(name, old, new, committer=committer, timestamp=timestamp,
419420 timezone=timezone, message=message)
420421
421422 def set_if_equals(self, name, old_ref, new_ref, committer=None,
460461 """Update multiple refs; intended only for testing."""
461462 # TODO(dborowitz): replace this with a public function that uses
462463 # set_if_equal.
463 self._refs.update(refs)
464 for ref, sha in refs.items():
465 self._refs[ref] = sha
464466
465467 def _update_peeled(self, peeled):
466468 """Update cached peeled refs; intended only for testing."""