update-ref --stdin: reimplement using reference transactions