Skip to content

Commit f87c15f

Browse files
committed
Merge branch 'jc/sequencer-stopped-sha-simplify' into seen
* jc/sequencer-stopped-sha-simplify: sequencer: stop abbreviating stopped-sha file
2 parents 9d11a5a + 0512eab commit f87c15f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

sequencer.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static GIT_PATH_FUNC(rebase_path_author_script, "rebase-merge/author-script")
120120
static GIT_PATH_FUNC(rebase_path_amend, "rebase-merge/amend")
121121
/*
122122
* When we stop at a given patch via the "edit" command, this file contains
123-
* the abbreviated commit name of the corresponding patch.
123+
* the commit object name of the corresponding patch.
124124
*/
125125
static GIT_PATH_FUNC(rebase_path_stopped_sha, "rebase-merge/stopped-sha")
126126
/*
@@ -3112,11 +3112,12 @@ static int make_patch(struct repository *r,
31123112
{
31133113
struct strbuf buf = STRBUF_INIT;
31143114
struct rev_info log_tree_opt;
3115-
const char *subject, *p;
3115+
const char *subject;
3116+
char hex[GIT_MAX_HEXSZ + 1];
31163117
int res = 0;
31173118

3118-
p = short_commit_name(commit);
3119-
if (write_message(p, strlen(p), rebase_path_stopped_sha(), 1) < 0)
3119+
oid_to_hex_r(hex, &commit->object.oid);
3120+
if (write_message(hex, strlen(hex), rebase_path_stopped_sha(), 1) < 0)
31203121
return -1;
31213122
res |= write_rebase_head(&commit->object.oid);
31223123

@@ -4528,7 +4529,7 @@ int sequencer_continue(struct repository *r, struct replay_opts *opts)
45284529

45294530
if (read_oneliner(&buf, rebase_path_stopped_sha(),
45304531
READ_ONELINER_SKIP_IF_EMPTY) &&
4531-
!get_oid_committish(buf.buf, &oid))
4532+
!get_oid_hex(buf.buf, &oid))
45324533
record_in_rewritten(&oid, peek_command(&todo_list, 0));
45334534
strbuf_release(&buf);
45344535
}

0 commit comments

Comments
 (0)