MerginMaps / MerginMaps/geodiff

Bad behavior of GEODIFF_createRebasedChangesetEx if one input changeset is empty

Open
#209 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
183
Forks
21
Avg merge
9d 11h
Merged PRs (30d)
2

Description

If one of the input diffs to GEODIFF_createRebasedChangesetEx() is empty, the file copy does a wrong thing:

https://github.com/MerginMaps/geodiff/blob/master/geodiff/src/geodiffrebase.cpp#L623

filecopy() has order of arguments 1. to, 2. from, but the code uses the opposite direction.

A regression from cf32f8a9 where boost::filesystem::copy() uses order of arguments 1. from, 2. to

Fortunately this should not affect ordinary mobile app / plugin users, as those call GEODIFF_rebase() which exists early if one of the input diffs is empty, without doing rebase.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in geodiff/src/geodiffrebase.cpp around line 623 and inspect GEODIFF_createRebasedChangesetEx() when one input changeset is empty. Check filecopy() against its documented destination/source argument order and the regression from cf32f8a9. Done means the empty-input path copies in the correct direction without affecting ordinary GEODIFF_rebase() behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.