diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2018-11-05 15:34:59 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-11-05 16:13:37 +0000 |
commit | 78580ad31031ddb850de002a02338f160186e247 (patch) | |
tree | a7e74e1f224b0d8704ac138a8636dc8685591608 /src/commit.c | |
parent | 605066eee9deac246db0dcef7737297f8e27b20a (diff) | |
download | libgit2-78580ad31031ddb850de002a02338f160186e247.tar.gz |
apply: test modifying a file after renaming it
Ensure that we cannot modify a file after it's been renamed out of the
way. If multiple deltas exist for a single path, ensure that we do not
attempt to modify a file after it's been renamed out of the way.
To support this, we must track the paths that have been removed or
renamed; add to a string map when we remove a path and remove from the
string map if we recreate a path. Validate that we are not applying to
a path that is in this map, unless the delta is a rename, since git
supports renaming one file to two different places in two different
deltas.
Further, test that we cannot apply a modification delta to a path that
will be created in the future by a rename (a path that does not yet
exist.)
Diffstat (limited to 'src/commit.c')
0 files changed, 0 insertions, 0 deletions