]> git.ipfire.org Git - thirdparty/git.git/commit
replay: allow to specify a ref with option --ref
authorToon Claes <toon@iotcl.com>
Wed, 1 Apr 2026 20:55:12 +0000 (22:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 2 Apr 2026 04:34:25 +0000 (21:34 -0700)
commit23d83f8ddbef9adcb87671358b473e55cf90c90b
tree8e290170f9de89e1002f6c8f80cffbdd84934ba8
parent6542cacbb33490ab83ef87a5fbee694cd2863bdd
replay: allow to specify a ref with option --ref

When option '--onto' is passed to git-replay(1), the command will update
refs from the <revision-range> passed to the command. When using option
'--advance' or '--revert', the argument of that option is a ref that
will be updated.

To enable users to specify which ref to update, add option '--ref'. When
using option '--ref', the refs described above are left untouched and
instead the argument of this option is updated instead.

Because this introduces code paths in replay.c that jump to `out` before
init_basic_merge_options() is called on `merge_opt`, zero-initialize the
struct.

Signed-off-by: Toon Claes <toon@iotcl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-replay.adoc
builtin/replay.c
replay.c
replay.h
t/t3650-replay-basics.sh