RFR: 50: Fix failing tests after e8d32c78dc
Robin Westberg via github.com
duke at openjdk.java.net
Wed Aug 7 11:13:33 UTC 2019
On Wed, 7 Aug 2019 10:23:00 GMT, Erik Duveblad via github.com <duke at openjdk.java.net> wrote:
> Hi all,
> this patch fixes some test failures after e8d32c78dc was integrated. Turns out there are different bugs in git with regards to unified diffs with zero context :cry: @JornVernee fixed the issues with the regular unified diff printer (when there is exactly one parent), this patch works around the issues with git's combined diff printer. The combined diff printer seems to print _correct_ start for empty hunks as long as the file the hunks belong to isn't added.
> I also updated a number of tests to take the changes in e8d32c78dc into account.
> ## Testing
> - [x] Run `sh gradlew test` on Linux x86-64
> - 0914742f: 50: Fix failing tests after e8d32c78dc
> Pull request:
> Fetch command:
> git fetch https://github.com/openjdk/skara.git pull/39/head:pull/39
This PR has been reviewed by Robin Westberg via github.com - changes are approved. Review comment:
Looks good, some minor comment change suggestions (one pre-existing).
vcs/src/main/java/org/openjdk/skara/vcs/tools/GitRange.java line 38:
> 38: // Need to work arond a bug in git where git sometimes print -1
> 39: // as an unsigned int for the count part of the range
// Need to work around a bug in git where git sometimes print -1
vcs/src/main/java/org/openjdk/skara/vcs/git/GitCombinedDiffParser.java line 17:
> 16: * 2 along with this work; if not, write to the Free Software Foundation,
> 17: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
> 18: *
// always have range (0,0), but git reports (1,0)
More information about the skara-dev