def git_refs_find_deltas(previous_refs, current_refs):
  """Finds new or updated git refs.

  Identifies the new git refs and the git refs whose commit hashes are
  different in current refs. Git refs present in previous_refs but missing
  from current_refs are ignored.

  Args:
    previous_refs: Dictionary of git refs to compare against.
    current_refs: Dictionary of git refs possibly containing new entries or
      updates.

  Returns:
    A dictionary of the new and updated git refs found in current_refs,
    otherwise an empty dictionary.
  """
  new_refs = {}
  for k, v in current_refs.items():
    if k not in previous_refs:
      new_refs[k] = v
    elif previous_refs[k] != v:
      new_refs[k] = v
  return new_refs