(ancestor *IndexEntry, our *IndexEntry, their *IndexEntry)
| 526 | } |
| 527 | |
| 528 | func (v *Index) AddConflict(ancestor *IndexEntry, our *IndexEntry, their *IndexEntry) error { |
| 529 | |
| 530 | var cancestor *C.git_index_entry |
| 531 | var cour *C.git_index_entry |
| 532 | var ctheir *C.git_index_entry |
| 533 | |
| 534 | if ancestor != nil { |
| 535 | cancestor = &C.git_index_entry{} |
| 536 | populateCIndexEntry(ancestor, cancestor) |
| 537 | defer freeCIndexEntry(cancestor) |
| 538 | } |
| 539 | |
| 540 | if our != nil { |
| 541 | cour = &C.git_index_entry{} |
| 542 | populateCIndexEntry(our, cour) |
| 543 | defer freeCIndexEntry(cour) |
| 544 | } |
| 545 | |
| 546 | if their != nil { |
| 547 | ctheir = &C.git_index_entry{} |
| 548 | populateCIndexEntry(their, ctheir) |
| 549 | defer freeCIndexEntry(ctheir) |
| 550 | } |
| 551 | |
| 552 | runtime.LockOSThread() |
| 553 | defer runtime.UnlockOSThread() |
| 554 | |
| 555 | ecode := C.git_index_conflict_add(v.ptr, cancestor, cour, ctheir) |
| 556 | runtime.KeepAlive(v) |
| 557 | runtime.KeepAlive(ancestor) |
| 558 | runtime.KeepAlive(our) |
| 559 | runtime.KeepAlive(their) |
| 560 | if ecode < 0 { |
| 561 | return MakeGitError(ecode) |
| 562 | } |
| 563 | return nil |
| 564 | } |
| 565 | |
| 566 | type IndexConflict struct { |
| 567 | Ancestor *IndexEntry |
nothing calls this directly
no test coverage detected