diff options
author | Edward Thomson <ethomson@microsoft.com> | 2014-09-11 16:46:46 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2014-10-26 22:59:43 -0400 |
commit | e69737d76098d67cd3ebf53b9c152cfc2675fc61 (patch) | |
tree | 16c028ea00235069443a2a0639bd991719c7ae93 | |
parent | ed2c06a6a1c8725483759782f60531d582d9ec46 (diff) | |
download | libgit2-e69737d76098d67cd3ebf53b9c152cfc2675fc61.tar.gz |
rebase: oid member of operation should be const
-rw-r--r-- | include/git2/rebase.h | 2 | ||||
-rw-r--r-- | src/rebase.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/git2/rebase.h b/include/git2/rebase.h index b9b0af73b..46fadc67b 100644 --- a/include/git2/rebase.h +++ b/include/git2/rebase.h @@ -90,7 +90,7 @@ typedef struct { * The commit ID being cherry-picked. This will be populated for * all operations except those of type `GIT_REBASE_OPERATION_EXEC`. */ - git_oid id; + const git_oid id; /** * The executable the user has requested be run. This will only diff --git a/src/rebase.c b/src/rebase.c index a4e9bade7..a27ecabc3 100644 --- a/src/rebase.c +++ b/src/rebase.c @@ -204,7 +204,7 @@ static int rebase_open_merge(git_rebase *rebase) git_buf_clear(&cmt); if ((error = git_buf_printf(&cmt, "cmt.%" PRIuZ, (i+1))) < 0 || - (error = rebase_readoid(&operation->id, &buf, &state_path, cmt.ptr)) < 0) + (error = rebase_readoid((git_oid *)&operation->id, &buf, &state_path, cmt.ptr)) < 0) goto done; } @@ -549,7 +549,7 @@ static int rebase_init_operations( operation = git_array_alloc(rebase->operations); operation->type = GIT_REBASE_OPERATION_PICK; - git_oid_cpy(&operation->id, &id); + git_oid_cpy((git_oid *)&operation->id, &id); } error = 0; |