git - Is there a diff & patch for large cut & pastes -
is there tool/workflow making diff+patch operation "commute" large cut & pastes operation between text files?
we've 3 files source.old
, source.new
, , destination
. copied several text hunks source.old
destination
, otherwise these files have shared history. we've since edited source.old
produce source.new
, suspect changes appearing in copied hunks relevant destination
.
we first automatically identify copy & pastes either using copy & paste detecting tool or specifying specific git commits representing paste operations on destination
. copy & paste edited copy, should describe copy & paste operations using diff-like context both source.old
, destination
, , provide diff each copied hunks.
we next create patch file representing changes source.old
source.new
occur within copied hunks, necessary replace context source.old
context destination
, , reorder hunks match destination
. apply patch interactively picking relevant changes.
is there easy way using diff & patch tools? if we're talking cut & paste operations source
, destination
live in same repository, presumably such tools must exist since 1 might split file multiple shorter files. i've been careful spin down working branches before sort of restructuring, presumably git handles such cross file changes okay. doing manually when source
, destination
live in unrelated repositories?
Comments
Post a Comment