Skip to content

Commit e69737d

Browse files
author
Edward Thomson
committed
rebase: oid member of operation should be const
1 parent ed2c06a commit e69737d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

include/git2/rebase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ typedef struct {
9090
* The commit ID being cherry-picked. This will be populated for
9191
* all operations except those of type `GIT_REBASE_OPERATION_EXEC`.
9292
*/
93-
git_oid id;
93+
const git_oid id;
9494

9595
/**
9696
* The executable the user has requested be run. This will only

src/rebase.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static int rebase_open_merge(git_rebase *rebase)
204204
git_buf_clear(&cmt);
205205

206206
if ((error = git_buf_printf(&cmt, "cmt.%" PRIuZ, (i+1))) < 0 ||
207-
(error = rebase_readoid(&operation->id, &buf, &state_path, cmt.ptr)) < 0)
207+
(error = rebase_readoid((git_oid *)&operation->id, &buf, &state_path, cmt.ptr)) < 0)
208208
goto done;
209209
}
210210

@@ -549,7 +549,7 @@ static int rebase_init_operations(
549549

550550
operation = git_array_alloc(rebase->operations);
551551
operation->type = GIT_REBASE_OPERATION_PICK;
552-
git_oid_cpy(&operation->id, &id);
552+
git_oid_cpy((git_oid *)&operation->id, &id);
553553
}
554554

555555
error = 0;

0 commit comments

Comments
 (0)