avoid removing old associated file when there is a merge conflict
authorJoey Hess <joeyh@joeyh.name>
Tue, 1 Jun 2021 15:24:15 +0000 (11:24 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 1 Jun 2021 15:43:00 +0000 (11:43 -0400)
commit5b7429e73ab21aaf1d229d221806e0b06fd11779
treeea227c1babc740f58308aa6bb7d88bda29adf4b5
parent3155c0d03e55625a1761301e441f64a47158f027
avoid removing old associated file when there is a merge conflict

It makes sense to keep the key used by the old version of an
associated file, until the merge conflict is resolved.

Note that, since in this case git diff is being run with --index, it's
not possible to use -1 or -3, which would let the keys
associated with the new versions of the file also be added. That would
be better, because it's possible that the local modification to the file
that caused the merge conflict has not yet gotten its new key recorded
in the db.

Opened a bug about a case this is thus not able to address.

Sponsored-by: Boyd Stephen Smith Jr. on Patreon
Database/Keys.hs
doc/bugs/case_where_keys_db_lags_reality.mdwn [new file with mode: 0644]