Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61d7328 commit 80a834aCopy full SHA for 80a834a
src/index.c
@@ -963,14 +963,20 @@ static int index_entry_reuc_init(git_index_reuc_entry **reuc_out,
963
*reuc_out = reuc = reuc_entry_alloc(path);
964
GITERR_CHECK_ALLOC(reuc);
965
966
- if ((reuc->mode[0] = ancestor_mode) > 0)
+ if ((reuc->mode[0] = ancestor_mode) > 0) {
967
+ assert(ancestor_oid);
968
git_oid_cpy(&reuc->oid[0], ancestor_oid);
969
+ }
970
- if ((reuc->mode[1] = our_mode) > 0)
971
+ if ((reuc->mode[1] = our_mode) > 0) {
972
+ assert(our_oid);
973
git_oid_cpy(&reuc->oid[1], our_oid);
974
975
- if ((reuc->mode[2] = their_mode) > 0)
976
+ if ((reuc->mode[2] = their_mode) > 0) {
977
+ assert(their_oid);
978
git_oid_cpy(&reuc->oid[2], their_oid);
979
980
981
return 0;
982
}
0 commit comments