[00:46] wgrant,blr: we're definitely going to need some pygit2 backports sooner rather than later - even disregarding merge_trees, conflicts handling in 0.22.0 is unusably bad for our purposes (you can find out that there was a conflict in a merge and which files it touched, but you can't get a merged version with conflict markers). I'm going to sort out some backports, as the patches we need look fairly self-contained [00:47] (why yes, I'm trying to put together the LP side of preview diffs because I can't sleep, why do you ask) [02:09] cjwatson: oh dear, hope you're not up all night! [02:11] meh ... [02:16] * cjwatson blinks at https://launchpad.net/~cjwatson/+archive/ubuntu/launchpad/+build/7350071. How is that architecture-specific in scalingstack? [03:30] https://github.com/libgit2/pygit2/pull/520 should fix the above, cherry-picking that [04:21] cjwatson: huh, in what instances were you seeing garbage in the diff? === mgz is now known as mgz_ [08:48] cjwatson: Hum, I guess I was looking at master rather than 0.22.0 when I thought the conflict handling looked OK. [09:42] blr: nothing we were using yet, but when trying to improve the conflict handling using merge_file_from_index, we ended up with garbage in place of the path in the conflict marker sometimes, because it wasn't holding onto a reference to that memory [09:43] wgrant: right, it's fiddly but I do now have a workable algorithm which I'll implement on Friday when actually working [09:45] basically walk over index.conflicts and do blob_oid = repo.create_blob(repo.merge_file_from_index(*conflict)); index.add(IndexEntry(path, blob_oid, GIT_FILEMODE_BLOB)); conflicts.remove(path) [09:45] and keep a note of the conflicted paths and return them separately [09:46] cjwatson: What was in the merged tree in case of conflicts? [09:47] wgrant: do you mean in diff_from_tree().patch? [09:48] cjwatson: yeah [09:48] wgrant: a patch removing the conflicted file [09:48] super-useful [09:48] ... oh [09:49] That's totally not what favor says it does. [09:49] it soooooooort of makes sense internally [09:49] in a very skewed way [09:52] but yeah, I noticed when I tried to write a test and observed that it made NO SENSE [09:52] (when adding info about conflicts to the compare-merge return value so that previewdiff can use them) [09:53] wgrant: the cherry-picks for this plus merge_tree are in the LP PPA now, anyway. [09:55] Lovely, thanks. === mgz_ is now known as mgz