Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

changePosition NULL on UnifiedDiffReader.parseUnifiedDiff #117

Closed
@elanzini

Description

@elanzini

I was testing the tool and I picked a random commit from this repo to do so. Let's take5338313. I accessed thediff of it by adding a.diffat the end of the URL and saved it intodiff.txt file. I then used the tool to parse it in the following way:

publicstaticvoidmain(String[]args)throwsIOException {varstream =newFileInputStream(newFile("/path/to/diff.txt"));varpatch  =UnifiedDiffReader.parseUnifiedDiff(stream);patch.getFiles().forEach(f -> {System.out.println("File: " +f.getFromFile());f.getPatch().getDeltas().forEach(delta -> {System.out.println("Source: ");System.out.println(delta.getSource().getPosition());delta.getSource().getChangePosition().forEach(System.out::print);System.out.println("Target: ");System.out.println(delta.getTarget().getPosition());delta.getTarget().getChangePosition().forEach(System.out::print);        });    });}

The deltagetChangePosition is justnull. Am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp