When we're recreating the commit that we'll be committing, we don't want to
filter our copy information based on just the *new* [versions of the] files
we're amending. The test has an example of this case, but for clarity, the
situation is:
$ hg cp src dst && hg commit <do some work> $ hg amend some_unrelated_file.txt $ hg status --copies A dst A some_unrelated_file.txt
What *should* happen is that dst should remain marked as a copy of src, but
this did not previously happen. matcher here only includes the files that were
specified on the commandline, so it only gets the copy information (if any, in
this example there's not) for some_unrelated_file.txt. When it goes to apply
the memctx to actually create the commit, the file copy information is
incomplete and loses the information for the files that shouldn't have been
affected at all by the amend.