arXiv:2608.22207cs.SEAug 2026

Manuscript Offprint

arXiv:2608.22207

D-Diff: An Interactive Environment for Adjusting Commit Boundaries Based on an Editable 3-way Diff

Daiki Muto, Takayoshi Ueno, Shinpei Hayashi

Daiki Muto, Takayoshi Ueno, Shinpei Hayashi

School of Computing, Institute of Science Tokyo, Tokyo 152–8550, Japan

{muto, ueno, hayashi}@se.comp.isct.ac.jp

294if (jp.nextToken() != JsonToken.START_ARRAY) {294if (jp.nextToken() != JsonToken.START_ARRAY) {
295throw new IAE("Next token wasn't a START_ARRAY, was[%s]", jp.getCurrentToken());295throw new IAE("Next token wasn't a START_ARRAY, was[%s] in url [%s]", jp.getCurrentToken(), url);
296} else {296} else {
301catch (IOException e) {301catch (IOException e) {
302throw Throwable.propagate(e);302throw new RE(e, "Failure.getting results from[%s]", url);
303}303}

(a) The first commit shown in a typical diff editor.

294if (jp.nextToken() != JsonToken.START_ARRAY) {294if (jp.nextToken() != JsonToken.START_ARRAY) {
295throw new IAE("Next token wasn't a START_ARRAY, was[%s]", jp.getCurrentToken());295throw new IAE("Next token wasn't a START_ARRAY, was[%s] in url [%s]", jp.getCurrentToken(), url);
296} else {296} else {
301catch (IOException e) {301catch (IOException e) {
302throw new RE(e, "Failure.getting results from[%s]", url);302throw new RE(e, "Failure.getting results from[%s]", url);
303}303}

(b) The second commit shown in a typical diff editor.

294if (jp.nextToken() != JsonToken.START_ARRAY) {294if (jp.nextToken() != JsonToken.START_ARRAY) {
295throw new IAE("Next token wasn't a START_ARRAY, was[%s]", jp.getCurrentToken());295throw new IAE("Next token wasn't a START_ARRAY, was[%s] from url [%s]", jp.getCurrentToken(), url);
296} else {296} else {
301catch (IOException e) {301catch (IOException e) {
302throw Throwable.propagate(e);302throw new RE(e, "Failure.getting results from[%s]", url);
303}303}

(c) 3-way diff display of D-Diff.

Fig. 1. Example of two consecutive commits with a partially altered boundary: (a, b) their diffs displayed separately and (c) integrated by D-Diff.

Abstract—In version control, it is recommended that each commit include only changes related to one task. To follow this recommendation, developers may need to adjust commit boundaries, that is, to compare and modify the diffs between two consecutive commits. Existing tools either display only a single diff at a time, forcing developers to rely on their memory when comparing diffs, or display three files simultaneously without showing the two consecutive diffs, forcing developers to infer them; both increase their cognitive load and hamper the adjustment. As a first step toward supporting this process, we propose D-Diff, an interactive diff adjustment environment for two consecutive commits that each involve the same single file. Based on a 3-way diff display, D-Diff integrates the two diffs into a single compact view, which also provides a way to modify them. A within-subjects user study with 8 participants showed that D-Diff significantly outperforms a baseline tool in terms of efficiency, reducing the median adjustment time from 530 seconds to 230 seconds (approximately 57%57\%). D-Diff also received a higher percentage of positive responses across all usability questionnaire items, while no statistically significant difference was found in accuracy.

Video demonstration: https://youtu.be/ra47jbrP5ZA

Index Terms—version control, adjusting commit boundaries, 3-way diff, software visualization

I. INTRODUCTION

In version control, it is recommended that each commit include only changes related to one task; such a commit is called a Task Level Commit (TLC) [1]. TLCs offer advantages such as facilitating the understanding of changes during code reviews [2] and reducing noise in repository mining [3]. However, developers often create commits that mix multiple intentions [3], [4]. Such commits, called Composite Commits (CC), hinder the understanding, reuse, and reverting of changes [5].

To follow this recommendation, developers may need to adjust commit boundaries. In this paper, adjusting commit boundaries refers to the process of comparing and modifying the diffs between two consecutive commits. This process is part of restructuring the entire commit history. A typical scenario is that a developer adjusts the boundaries of local commits before pushing them to a shared repository, since rewriting already shared history is discouraged. In this process, developers can leverage approaches that automatically split CCs into TLCs [6]–[8], increasingly driven by large language

© 2026 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.

models, to obtain initial commit boundaries. However, what counts as a single task varies across organizations and projects, so an automatic split rarely matches the developer's intent out of the box; a human must still inspect it and shift changes across commit boundaries to finalize it. Automatic splitting and manual adjustment are complementary, but the interactive support for this last-mile correction remains limited.

While several tools [9]–[11] and standard methods provided by version control systems (VCSs) can be used for adjusting commit boundaries, they are not well-suited for this process. Most of them display only a single diff at a time, as illustrated in Figs. 1a and 1b, requiring developers to memorize the not-displayed diff when comparing diffs. The others display three files simultaneously but show only where the files differ, requiring developers to infer the two consecutive diffs from the displayed differences.

In this paper, to address this challenge, we propose D-Diff, an interactive diff adjustment environment. Instead of manipulating commits indirectly through rebase commands and hunk-by-hunk staging, D-Diff lets developers directly edit the state that lies between the two commits: it shows the two diffs around this shared boundary version using a 3-way diff display, as shown in Fig. 1c, and the commits are updated as the developer moves changes across the boundary or edits it. This simultaneous view reduces the cognitive load of comparing diffs. As a first step toward supporting this process, D-Diff focuses on cases where the two commits each involve the same single file.

The primary contributions of this paper are as follows:

  • We characterize adjusting commit boundaries as the comparison and modification of the diffs between two consecutive commits, and show that existing tools are ill-suited to it because they either display only a single diff at a time, forcing developers to rely on their memory when comparing diffs, or display three files simultaneously without showing the two consecutive diffs, forcing developers to infer them.

  • We propose D-Diff, an interactive diff adjustment environment for two consecutive commits that each involve the same single file. D-Diff integrates, in one screen, (i) the simultaneous comparison of two diffs by adapting a 3-way diff display, with a coloring scheme that distinguishes the changes of each commit from those shared by both, and (ii) the modification of diffs in multiple ways: line-level movement, hunk-level movement, and direct editing. The alignment reuses established differencing techniques rather than a new algorithm; the contribution is the interaction design that turns editing the shared boundary state into a commit-boundary operation.

  • We provide empirical evidence, through a within-subjects user study with 8 participants, that D-Diff significantly improves the efficiency of adjusting commit boundaries over a baseline tool (median time reduced from 530 to 230 seconds, about 57%57\%), and is rated higher in usability, while no statistically significant difference in accuracy is observed.

TABLE I COMPARISON OF EXISTING TOOLS USABLE FOR ADJUSTING COMMIT BOUNDARIES

ToolComparison MethodModification Method
EditingMoving
git commandSingle diff + memory✓
GUI clients and IDEsSingle diff + memory✓✓
Jujutsu [12] + Meld [13] / Diffedit3 [14]Single diff + memory✓✓
ChTree [9]Single diff + memory✓
ChangeBeadsThreader [10]Single diff + memory✓
SmartCommit [11]Single diff + memory✓
diff3 [15]Three files simultaneously
vimdiff (Vim [16])Three files simultaneously✓✓

The structure of this paper is as follows. Section II clarifies the requirements for the proposed approach. Section III reviews related work. Section IV presents the design and implementation of D-Diff. Section V evaluates it through a user study. Section VI concludes.

References (41)