Table of Contents
Fetching ...

WizardMerge -- Save Us From Merging Without Any Clues

Qingyu Zhang, Junzhe Li, Jiayi Lin, Jie Ding, Lanteng Lin, Chenxiong Qian

TL;DR

WizardMerge introduces an LLVM-IR–driven dependency analysis to guide Git merge by mapping text-level changes to a definition dependency graph. It identifies violated dependencies caused by applied but incorrect blocks, and outputs a priority-based set of merging suggestions via a minimum dependency graph, rather than forcing automatic resolutions. Evaluated on five large projects with 227 conflicts, it achieves a substantial reduction in merge time (average 23.85%) and provides actionable guidance for most affected code blocks, while also revealing conflict-unrelated blocks that Git may misapply. The work advances merging assistance beyond conflict resolution, offering fine-grained insights into dependency maintenance and potential latent errors, with open-source release planned.

Abstract

Modern software development necessitates efficient version-oriented collaboration among developers. While Git is the most popular version control system, it generates unsatisfactory version merging results due to textual-based workflow, leading to potentially unexpected results in the merged version of the project. Although numerous merging tools have been proposed for improving merge results, developers remain struggling to resolve the conflicts and fix incorrectly modified code without clues. We present WizardMerge, an auxiliary tool that leverages merging results from Git to retrieve code block dependency on text and LLVM-IR level and provide suggestions for developers to resolve errors introduced by textual merging. Through the evaluation, we subjected WizardMerge to testing on 227 conflicts within five large-scale projects. The outcomes demonstrate that WizardMerge diminishes conflict merging time costs, achieving a 23.85% reduction. Beyond addressing conflicts, WizardMerge provides merging suggestions for over 70% of the code blocks potentially affected by the conflicts. Notably, WizardMerge exhibits the capability to identify conflict-unrelated code blocks that require manual intervention yet are harmfully applied by Git during the merging.

WizardMerge -- Save Us From Merging Without Any Clues

TL;DR

WizardMerge introduces an LLVM-IR–driven dependency analysis to guide Git merge by mapping text-level changes to a definition dependency graph. It identifies violated dependencies caused by applied but incorrect blocks, and outputs a priority-based set of merging suggestions via a minimum dependency graph, rather than forcing automatic resolutions. Evaluated on five large projects with 227 conflicts, it achieves a substantial reduction in merge time (average 23.85%) and provides actionable guidance for most affected code blocks, while also revealing conflict-unrelated blocks that Git may misapply. The work advances merging assistance beyond conflict resolution, offering fine-grained insights into dependency maintenance and potential latent errors, with open-source release planned.

Abstract

Modern software development necessitates efficient version-oriented collaboration among developers. While Git is the most popular version control system, it generates unsatisfactory version merging results due to textual-based workflow, leading to potentially unexpected results in the merged version of the project. Although numerous merging tools have been proposed for improving merge results, developers remain struggling to resolve the conflicts and fix incorrectly modified code without clues. We present WizardMerge, an auxiliary tool that leverages merging results from Git to retrieve code block dependency on text and LLVM-IR level and provide suggestions for developers to resolve errors introduced by textual merging. Through the evaluation, we subjected WizardMerge to testing on 227 conflicts within five large-scale projects. The outcomes demonstrate that WizardMerge diminishes conflict merging time costs, achieving a 23.85% reduction. Beyond addressing conflicts, WizardMerge provides merging suggestions for over 70% of the code blocks potentially affected by the conflicts. Notably, WizardMerge exhibits the capability to identify conflict-unrelated code blocks that require manual intervention yet are harmfully applied by Git during the merging.
Paper Structure (28 sections, 6 equations, 8 figures, 2 tables)

This paper contains 28 sections, 6 equations, 8 figures, 2 tables.

Figures (8)

  • Figure 1: Three-way merging workflow of Git.
  • Figure 2: An example of a clean but incorrect Git merge with the three-way merging algorithm
  • Figure 3: An example of different resolutions to the same conflict
  • Figure 4: System overview of WizardMerge.
  • Figure 5: Example alignment between node and DCB text.
  • ...and 3 more figures