Re: bug? git format-patch -M -D then git am fails
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Nov 14, 2012, 13:28 UTC
- Message-ID
- <50A39C60.7000005@drmicha.warpmail.net>
- In-Reply-To
- <7vfw4dccm7.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 14.11.2012 00:22:
Show 17 quoted lines
> Joe Perches <joe@perches.com> writes: > >> I don't believe that reversibility >> is a really useful aspect of deletion patches >> when there are known git repositories involved. > > You can read "reversibility" as "safety" if you want. We would want > to make sure we know what we are deleting before deleting a path. > > The history that the receiver of such a patch has may have further > changes that are relevant that the sender of the deletion patch did > not know about, and removing the path in such a case would make the > result inconsistent. If the sender did his work on top of the newer > version with the change in the path, the sender's patch may still > have deleted the path but would have had changes to other paths to > compensate for the loss of that change. >
Just in case someone wants to hack on this: To be safe, "git am" would need to read the blob's sha1 from something like
diff --git a/Makefile b/Makefile deleted file mode 100644 index 1b6d84d..0000000 and check that the file to be deleted matches. Michael