Skip to content

Commit c779386

Browse files
jonathantanmygitster
authored andcommitted
sequencer: tolerate abbreviated stopped-sha file
In 0512eab ("sequencer: stop abbreviating stopped-sha file", 2020-09-25), Git was taught both to write full object names to the stopped-sha file and to require full object names when reading. However, a user would experience a problem if they started an interactive rebase using an old version of Git and then continued with a current version of Git (for example, if the system version of Git was updated in the meantime). Teach Git to allow object names of any length when reading. Signed-off-by: Jonathan Tan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0512eab commit c779386

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sequencer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2552,7 +2552,7 @@ static int read_populate_opts(struct replay_opts *opts)
25522552
}
25532553

25542554
if (read_oneliner(&buf, rebase_path_squash_onto(), 0)) {
2555-
if (get_oid_hex(buf.buf, &opts->squash_onto) < 0) {
2555+
if (get_oid_committish(buf.buf, &opts->squash_onto) < 0) {
25562556
ret = error(_("unusable squash-onto"));
25572557
goto done_rebase_i;
25582558
}

0 commit comments

Comments
 (0)