Commit a1bbc0ce205b6d3496338d3253c847aa91cabc7b

Carlos Martín Nieto 2014-01-25T04:14:37

merge: rename _oid() -> id() Following the rest of the series, use 'id' when refering to the value.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
diff --git a/include/git2/merge.h b/include/git2/merge.h
index ad9b5e2..3ef27e3 100644
--- a/include/git2/merge.h
+++ b/include/git2/merge.h
@@ -160,13 +160,13 @@ GIT_EXTERN(int) git_merge_head_from_fetchhead(
  *
  * @param out pointer to store the git_merge_head result in
  * @param repo repository that contains the given commit
- * @param oid the commit object id to use as a merge input
+ * @param id the commit object id to use as a merge input
  * @return zero on success, -1 on failure.
  */
-GIT_EXTERN(int) git_merge_head_from_oid(
+GIT_EXTERN(int) git_merge_head_from_id(
 	git_merge_head **out,
 	git_repository *repo,
-	const git_oid *oid);
+	const git_oid *id);
 
 /**
  * Frees a `git_merge_head`
@@ -251,7 +251,7 @@ GIT_EXTERN(int) git_merge_result_is_fastforward(git_merge_result *merge_result);
  * @param out the OID of the fast-forward
  * @param merge_result the results of the merge
  */
-GIT_EXTERN(int) git_merge_result_fastforward_oid(git_oid *out, git_merge_result *merge_result);
+GIT_EXTERN(int) git_merge_result_fastforward_id(git_oid *out, git_merge_result *merge_result);
 
 GIT_EXTERN(void) git_merge_result_free(git_merge_result *merge_result);
 
diff --git a/src/merge.c b/src/merge.c
index ee000d5..f422495 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -2111,7 +2111,7 @@ static int merge_ancestor_head(
 	if ((error = git_merge_base_many(&ancestor_oid, repo, their_heads_len + 1, oids)) < 0)
 		goto on_error;
 
-	error = git_merge_head_from_oid(ancestor_head, repo, &ancestor_oid);
+	error = git_merge_head_from_id(ancestor_head, repo, &ancestor_oid);
 
 on_error:
 	git__free(oids);
@@ -2615,7 +2615,7 @@ int git_merge_result_is_fastforward(git_merge_result *merge_result)
 	return merge_result->is_fastforward;
 }
 
-int git_merge_result_fastforward_oid(git_oid *out, git_merge_result *merge_result)
+int git_merge_result_fastforward_id(git_oid *out, git_merge_result *merge_result)
 {
 	assert(out && merge_result);
 
@@ -2699,7 +2699,7 @@ int git_merge_head_from_ref(
 	return error;
 }
 
-int git_merge_head_from_oid(
+int git_merge_head_from_id(
 	git_merge_head **out,
 	git_repository *repo,
 	const git_oid *oid)
diff --git a/tests/merge/workdir/fastforward.c b/tests/merge/workdir/fastforward.c
index 861f383..d6b3148 100644
--- a/tests/merge/workdir/fastforward.c
+++ b/tests/merge/workdir/fastforward.c
@@ -13,10 +13,10 @@ static git_index *repo_index;
 #define TEST_INDEX_PATH TEST_REPO_PATH "/.git/index"
 
 #define THEIRS_FASTFORWARD_BRANCH	"ff_branch"
-#define THEIRS_FASTFORWARD_OID		"fd89f8cffb663ac89095a0f9764902e93ceaca6a"
+#define THEIRS_FASTFORWARD_ID		"fd89f8cffb663ac89095a0f9764902e93ceaca6a"
 
 #define THEIRS_NOFASTFORWARD_BRANCH	"branch"
-#define THEIRS_NOFASTFORWARD_OID	"7cb63eed597130ba4abb87b3e544b85021905520"
+#define THEIRS_NOFASTFORWARD_ID	"7cb63eed597130ba4abb87b3e544b85021905520"
 
 
 // Fixture setup and teardown
@@ -57,11 +57,11 @@ void test_merge_workdir_fastforward__fastforward(void)
 	git_merge_result *result;
 	git_oid expected, ff_oid;
 
-	cl_git_pass(git_oid_fromstr(&expected, THEIRS_FASTFORWARD_OID));
+	cl_git_pass(git_oid_fromstr(&expected, THEIRS_FASTFORWARD_ID));
 
 	cl_assert(result = merge_fastforward_branch(0));
 	cl_assert(git_merge_result_is_fastforward(result));
-	cl_git_pass(git_merge_result_fastforward_oid(&ff_oid, result));
+	cl_git_pass(git_merge_result_fastforward_id(&ff_oid, result));
 	cl_assert(git_oid_cmp(&ff_oid, &expected) == 0);
 
 	git_merge_result_free(result);
@@ -136,7 +136,7 @@ void test_merge_workdir_fastforward__uptodate_merging_prev_commit(void)
 	git_merge_result *result;
 
 	cl_git_pass(git_oid_fromstr(&their_oid, "c607fc30883e335def28cd686b51f6cfa02b06ec"));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[0], repo, &their_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[0], repo, &their_oid));
 
 	cl_git_pass(git_merge(&result, repo, (const git_merge_head **)their_heads, 1, NULL));
 
diff --git a/tests/merge/workdir/setup.c b/tests/merge/workdir/setup.c
index 870d55e..05f994e 100644
--- a/tests/merge/workdir/setup.c
+++ b/tests/merge/workdir/setup.c
@@ -79,7 +79,7 @@ void test_merge_workdir_setup__one_branch(void)
 	git_merge_head *our_head, *their_heads[1];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 	
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_ref));
@@ -105,7 +105,7 @@ void test_merge_workdir_setup__no_fastforward(void)
 	git_merge_head *our_head, *their_heads[1];
 
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_ref));
@@ -131,10 +131,10 @@ void test_merge_workdir_setup__one_oid(void)
 	git_merge_head *our_head, *their_heads[1];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 	
 	cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[0], repo, &octo1_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[0], repo, &octo1_oid));
 
 	cl_git_pass(git_merge__setup(repo, our_head, (const git_merge_head **)their_heads, 1, 0));
 
@@ -156,7 +156,7 @@ void test_merge_workdir_setup__two_branches(void)
 	git_merge_head *our_head, *their_heads[2];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 	
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_ref));
@@ -189,7 +189,7 @@ void test_merge_workdir_setup__three_branches(void)
 	git_merge_head *our_head, *their_heads[3];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_ref));
@@ -227,16 +227,16 @@ void test_merge_workdir_setup__three_oids(void)
 	git_merge_head *our_head, *their_heads[3];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[0], repo, &octo1_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[0], repo, &octo1_oid));
 	
 	cl_git_pass(git_oid_fromstr(&octo2_oid, OCTO2_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[1], repo, &octo2_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[1], repo, &octo2_oid));
 
 	cl_git_pass(git_oid_fromstr(&octo3_oid, OCTO3_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[2], repo, &octo3_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[2], repo, &octo3_oid));
 
 	cl_git_pass(git_merge__setup(repo, our_head, (const git_merge_head **)their_heads, 3, 0));
 
@@ -260,13 +260,13 @@ void test_merge_workdir_setup__branches_and_oids_1(void)
 	git_merge_head *our_head, *their_heads[2];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_ref));
 
 	cl_git_pass(git_oid_fromstr(&octo2_oid, OCTO2_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[1], repo, &octo2_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[1], repo, &octo2_oid));
 
 	cl_git_pass(git_merge__setup(repo, our_head, (const git_merge_head **)their_heads, 2, 0));
 
@@ -293,19 +293,19 @@ void test_merge_workdir_setup__branches_and_oids_2(void)
 	git_merge_head *our_head, *their_heads[4];
 
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_ref));
 	
 	cl_git_pass(git_oid_fromstr(&octo2_oid, OCTO2_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[1], repo, &octo2_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[1], repo, &octo2_oid));
 
 	cl_git_pass(git_reference_lookup(&octo3_ref, repo, GIT_REFS_HEADS_DIR OCTO3_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[2], repo, octo3_ref));
 	
 	cl_git_pass(git_oid_fromstr(&octo4_oid, OCTO4_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[3], repo, &octo4_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[3], repo, &octo4_oid));
 	
 	cl_git_pass(git_merge__setup(repo, our_head, (const git_merge_head **)their_heads, 4, 0));
 
@@ -335,16 +335,16 @@ void test_merge_workdir_setup__branches_and_oids_3(void)
 	git_merge_head *our_head, *their_heads[4];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[0], repo, &octo1_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[0], repo, &octo1_oid));
 
 	cl_git_pass(git_reference_lookup(&octo2_ref, repo, GIT_REFS_HEADS_DIR OCTO2_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[1], repo, octo2_ref));
 
 	cl_git_pass(git_oid_fromstr(&octo3_oid, OCTO3_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[2], repo, &octo3_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[2], repo, &octo3_oid));
 	
 	cl_git_pass(git_reference_lookup(&octo4_ref, repo, GIT_REFS_HEADS_DIR OCTO4_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[3], repo, octo4_ref));
@@ -378,16 +378,16 @@ void test_merge_workdir_setup__branches_and_oids_4(void)
 	git_merge_head *our_head, *their_heads[5];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 	
 	cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[0], repo, &octo1_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[0], repo, &octo1_oid));
 	
 	cl_git_pass(git_reference_lookup(&octo2_ref, repo, GIT_REFS_HEADS_DIR OCTO2_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[1], repo, octo2_ref));
 	
 	cl_git_pass(git_oid_fromstr(&octo3_oid, OCTO3_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[2], repo, &octo3_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[2], repo, &octo3_oid));
 	
 	cl_git_pass(git_reference_lookup(&octo4_ref, repo, GIT_REFS_HEADS_DIR OCTO4_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[3], repo, octo4_ref));
@@ -424,7 +424,7 @@ void test_merge_workdir_setup__three_same_branches(void)
 	git_merge_head *our_head, *their_heads[3];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 	
 	cl_git_pass(git_reference_lookup(&octo1_1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_1_ref));
@@ -462,16 +462,16 @@ void test_merge_workdir_setup__three_same_oids(void)
 	git_merge_head *our_head, *their_heads[3];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 	
 	cl_git_pass(git_oid_fromstr(&octo1_1_oid, OCTO1_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[0], repo, &octo1_1_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[0], repo, &octo1_1_oid));
 	
 	cl_git_pass(git_oid_fromstr(&octo1_2_oid, OCTO1_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[1], repo, &octo1_2_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[1], repo, &octo1_2_oid));
 	
 	cl_git_pass(git_oid_fromstr(&octo1_3_oid, OCTO1_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[2], repo, &octo1_3_oid));
+	cl_git_pass(git_merge_head_from_id(&their_heads[2], repo, &octo1_3_oid));
 	
 	cl_git_pass(git_merge__setup(repo, our_head, (const git_merge_head **)their_heads, 3, 0));
 	
@@ -539,7 +539,7 @@ void test_merge_workdir_setup__remote_tracking_one_branch(void)
 	cl_git_pass(create_remote_tracking_branch(OCTO1_BRANCH, OCTO1_OID));
 
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 	
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_REMOTES_DIR "origin/" OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_ref));
@@ -569,7 +569,7 @@ void test_merge_workdir_setup__remote_tracking_two_branches(void)
 	cl_git_pass(create_remote_tracking_branch(OCTO2_BRANCH, OCTO2_OID));
 
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 	
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_REMOTES_DIR "origin/" OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_ref));
@@ -606,7 +606,7 @@ void test_merge_workdir_setup__remote_tracking_three_branches(void)
 	cl_git_pass(create_remote_tracking_branch(OCTO3_BRANCH, OCTO3_OID));
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_REMOTES_DIR "origin/" OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_ref));
@@ -645,7 +645,7 @@ void test_merge_workdir_setup__normal_branch_and_remote_tracking_branch(void)
 	cl_git_pass(create_remote_tracking_branch(OCTO2_BRANCH, OCTO2_OID));
 
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_ref));
@@ -679,7 +679,7 @@ void test_merge_workdir_setup__remote_tracking_branch_and_normal_branch(void)
 	cl_git_pass(create_remote_tracking_branch(OCTO1_BRANCH, OCTO1_OID));
 
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 	
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_REMOTES_DIR "origin/" OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_ref));
@@ -716,7 +716,7 @@ void test_merge_workdir_setup__two_remote_tracking_branch_and_two_normal_branche
 	cl_git_pass(create_remote_tracking_branch(OCTO4_BRANCH, OCTO4_OID));
 
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 	
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_ref));
@@ -757,7 +757,7 @@ void test_merge_workdir_setup__pull_one(void)
 	git_merge_head *our_head, *their_heads[1];
 
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_oid_fromstr(&octo1_1_oid, OCTO1_OID));
 	cl_git_pass(git_merge_head_from_fetchhead(&their_heads[0], repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH, "http://remote.url/repo.git", &octo1_1_oid));
@@ -782,7 +782,7 @@ void test_merge_workdir_setup__pull_two(void)
 	git_merge_head *our_head, *their_heads[2];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
 	cl_git_pass(git_merge_head_from_fetchhead(&their_heads[0], repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH, "http://remote.url/repo.git", &octo1_oid));
@@ -812,7 +812,7 @@ void test_merge_workdir_setup__pull_three(void)
 	git_merge_head *our_head, *their_heads[3];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
 	cl_git_pass(git_merge_head_from_fetchhead(&their_heads[0], repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH, "http://remote.url/repo.git", &octo1_oid));
@@ -845,7 +845,7 @@ void test_merge_workdir_setup__three_remotes(void)
 	git_merge_head *our_head, *their_heads[3];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
 	cl_git_pass(git_merge_head_from_fetchhead(&their_heads[0], repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH, "http://remote.first/repo.git", &octo1_oid));
@@ -879,7 +879,7 @@ void test_merge_workdir_setup__two_remotes(void)
 	git_merge_head *our_head, *their_heads[4];
 	
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_oid_fromstr(&octo1_oid, OCTO1_OID));
 	cl_git_pass(git_merge_head_from_fetchhead(&their_heads[0], repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH, "http://remote.first/repo.git", &octo1_oid));
@@ -1002,7 +1002,7 @@ void test_merge_workdir_setup__retained_after_success(void)
 	opts.merge_flags |= GIT_MERGE_NO_FASTFORWARD;
 
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
 
@@ -1033,7 +1033,7 @@ void test_merge_workdir_setup__removed_after_failure(void)
 	opts.merge_flags |= GIT_MERGE_NO_FASTFORWARD;
 
 	cl_git_pass(git_oid_fromstr(&our_oid, ORIG_HEAD));
-	cl_git_pass(git_merge_head_from_oid(&our_head, repo, &our_oid));
+	cl_git_pass(git_merge_head_from_id(&our_head, repo, &our_oid));
 
 	cl_git_pass(git_reference_lookup(&octo1_ref, repo, GIT_REFS_HEADS_DIR OCTO1_BRANCH));
 	cl_git_pass(git_merge_head_from_ref(&their_heads[0], repo, octo1_ref));
diff --git a/tests/merge/workdir/simple.c b/tests/merge/workdir/simple.c
index 266719e..4ff761c 100644
--- a/tests/merge/workdir/simple.c
+++ b/tests/merge/workdir/simple.c
@@ -134,7 +134,7 @@ static git_merge_result *merge_simple_branch(int merge_file_favor, int checkout_
 	git_merge_opts opts = GIT_MERGE_OPTS_INIT;
 
 	cl_git_pass(git_oid_fromstr(&their_oids[0], THEIRS_SIMPLE_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[0], repo, &their_oids[0]));
+	cl_git_pass(git_merge_head_from_id(&their_heads[0], repo, &their_oids[0]));
 
 	opts.merge_tree_opts.file_favor = merge_file_favor;
 	opts.checkout_opts.checkout_strategy = checkout_strategy;
@@ -588,7 +588,7 @@ void test_merge_workdir_simple__directory_file(void)
 	cl_git_pass(git_reset(repo, (git_object *)head_commit, GIT_RESET_HARD));
 
 	cl_git_pass(git_oid_fromstr(&their_oids[0], THEIRS_DIRECTORY_FILE));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[0], repo, &their_oids[0]));
+	cl_git_pass(git_merge_head_from_id(&their_heads[0], repo, &their_oids[0]));
 
 	opts.merge_tree_opts.file_favor = 0;
 	cl_git_pass(git_merge(&result, repo, (const git_merge_head **)their_heads, 1, &opts));
@@ -621,7 +621,7 @@ void test_merge_workdir_simple__unrelated(void)
 	};
 
 	cl_git_pass(git_oid_fromstr(&their_oids[0], THEIRS_UNRELATED_PARENT));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[0], repo, &their_oids[0]));
+	cl_git_pass(git_merge_head_from_id(&their_heads[0], repo, &their_oids[0]));
 
 	opts.merge_tree_opts.file_favor = 0;
 	cl_git_pass(git_merge(&result, repo, (const git_merge_head **)their_heads, 1, &opts));
@@ -654,7 +654,7 @@ void test_merge_workdir_simple__unrelated_with_conflicts(void)
 	};
 
 	cl_git_pass(git_oid_fromstr(&their_oids[0], THEIRS_UNRELATED_OID));
-	cl_git_pass(git_merge_head_from_oid(&their_heads[0], repo, &their_oids[0]));
+	cl_git_pass(git_merge_head_from_id(&their_heads[0], repo, &their_oids[0]));
 
 	opts.merge_tree_opts.file_favor = 0;
 	cl_git_pass(git_merge(&result, repo, (const git_merge_head **)their_heads, 1, &opts));
@@ -686,7 +686,7 @@ void test_merge_workdir_simple__binary(void)
 	cl_git_pass(git_commit_lookup(&our_commit, repo, &our_oid));
 	cl_git_pass(git_reset(repo, (git_object *)our_commit, GIT_RESET_HARD));
 
-	cl_git_pass(git_merge_head_from_oid(&their_head, repo, &their_oid));
+	cl_git_pass(git_merge_head_from_id(&their_head, repo, &their_oid));
 
 	cl_git_pass(git_merge(&result, repo, (const git_merge_head **)&their_head, 1, &opts));