class Git::Commands::UpdateRef::Update

Updates a ref to point to a new object via ‘git update-ref`

Stores ‘<newvalue>` in `<ref>`, optionally verifying that the current value matches `<oldvalue>` before performing the update. Follows symbolic refs by default unless `no_deref: true` is given.

@example Update a branch ref

cmd = Git::Commands::UpdateRef::Update.new(execution_context)
cmd.call('refs/heads/main', 'abc1234')

@example Update with old-value verification

cmd = Git::Commands::UpdateRef::Update.new(execution_context)
cmd.call('refs/heads/main', 'newsha', 'oldsha')

@example Update with a reflog message

cmd = Git::Commands::UpdateRef::Update.new(execution_context)
cmd.call('refs/heads/main', 'abc1234', m: 'reset to upstream')

@note ‘arguments` block audited against git-scm.com/docs/git-update-ref/2.53.0

@see Git::Commands::UpdateRef

@see git-scm.com/docs/git-update-ref git-update-ref documentation

@api private