{"thread":{"id":"4876","subject":"when is \"git diff\" output suitable for patch?","startedAt":"2006-07-13T21:21:27Z","lastAt":"2006-07-13T21:53:14Z","messageCount":5,"participants":["J. Bruce Fields","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"23778","messageId":"20060713212127.GA30770@fieldses.org","threadId":"4876","inReplyTo":null,"subject":"when is \"git diff\" output suitable for patch?","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2006-07-13T21:21:27Z","receivedAt":"2006-07-13T21:21:27Z","isPatch":false,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"I assume the -C and -M, -c, and -cc options all result in diff output\nthat can't be correctly applied by \"patch\" any more?  (Would a patch to\nthe git-diff-files documentation warning about this be helpful?)\n\nSomeone I'm working with is having trouble applying patches that they\ncreated with a simple \"git diff\".  The patches in question have some\n\"copy from/copy to\" headers.  Should that every happen with just a plain\n\"git diff\"?  Is this a bug in their version of git?  (They're on 1.2.4).\n\n--b.\n"},{"id":"23779","messageId":"7vhd1lurei.fsf@assigned-by-dhcp.cox.net","threadId":"4876","inReplyTo":"20060713212127.GA30770@fieldses.org","subject":"Re: when is \"git diff\" output suitable for patch?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-07-13T21:27:33Z","receivedAt":"2006-07-13T21:27:33Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"J. Bruce Fields\" <bfields@fieldses.org> writes:\n\n> I assume the -C and -M, -c, and -cc options all result in diff output\n> that can't be correctly applied by \"patch\" any more?  (Would a patch to\n> the git-diff-files documentation warning about this be helpful?)\n\nMay not be bad to have, except that I do not know if\n\"git-diff-files\" documentation is the right place to talk about\nit.\n\n> Someone I'm working with is having trouble applying patches that they\n> created with a simple \"git diff\".  The patches in question have some\n> \"copy from/copy to\" headers.  Should that every happen with just a plain\n> \"git diff\"?  Is this a bug in their version of git?  (They're on 1.2.4).\n\nAs far as I recall \"git diff\" never defaulted to -M.  These days\nyou can have diff.renames = true in the configuration to make it\nso, but and I do not think there was any way to do that back in\n1.2.4.\n\nIf _they_ created the diff with git, and if that is the same\n_they_ who are having trouble applying, maybe you can suggest to\nuse \"git apply\" instead of \"patch -p1\"?\n"},{"id":"23781","messageId":"20060713213116.GK19366@fieldses.org","threadId":"4876","inReplyTo":"7vhd1lurei.fsf@assigned-by-dhcp.cox.net","subject":"Re: when is \"git diff\" output suitable for patch?","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2006-07-13T21:31:16Z","receivedAt":"2006-07-13T21:31:16Z","isPatch":false,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Thu, Jul 13, 2006 at 02:27:33PM -0700, Junio C Hamano wrote:\n> \"J. Bruce Fields\" <bfields@fieldses.org> writes:\n> \n> > I assume the -C and -M, -c, and -cc options all result in diff output\n> > that can't be correctly applied by \"patch\" any more?  (Would a patch to\n> > the git-diff-files documentation warning about this be helpful?)\n> \n> May not be bad to have, except that I do not know if\n> \"git-diff-files\" documentation is the right place to talk about\n> it.\n\nOK.\n\n> > Someone I'm working with is having trouble applying patches that they\n> > created with a simple \"git diff\".  The patches in question have some\n> > \"copy from/copy to\" headers.  Should that every happen with just a plain\n> > \"git diff\"?  Is this a bug in their version of git?  (They're on 1.2.4).\n> \n> As far as I recall \"git diff\" never defaulted to -M.\n\nHm.  Is this related?:\n\ncommit 42efbf6d8a5b4902c55a2f6e96034625c056ba1f\nAuthor: Junio C Hamano <junkio@cox.net>\nDate:   Sat Mar 11 17:44:10 2006 -0800\n\n    git-diff: -p disables rename detection.\n\n--b.\n"},{"id":"23784","messageId":"7v3bd5uqav.fsf@assigned-by-dhcp.cox.net","threadId":"4876","inReplyTo":"20060713213116.GK19366@fieldses.org","subject":"Re: when is \"git diff\" output suitable for patch?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-07-13T21:51:20Z","receivedAt":"2006-07-13T21:51:20Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"J. Bruce Fields\" <bfields@fieldses.org> writes:\n\n>> As far as I recall \"git diff\" never defaulted to -M.\n>\n> Hm.  Is this related?:\n>\n> commit 42efbf6d8a5b4902c55a2f6e96034625c056ba1f\n> Author: Junio C Hamano <junkio@cox.net>\n> Date:   Sat Mar 11 17:44:10 2006 -0800\n>\n>     git-diff: -p disables rename detection.\n\nAh, sorry, it _did_ default to -M; it was in such an ancient\npast and the shell wrapper wasn't initially done by me, so I\nmisremembered.\n"},{"id":"23785","messageId":"20060713215313.GO19366@fieldses.org","threadId":"4876","inReplyTo":"7v3bd5uqav.fsf@assigned-by-dhcp.cox.net","subject":"Re: when is \"git diff\" output suitable for patch?","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2006-07-13T21:53:14Z","receivedAt":"2006-07-13T21:53:14Z","isPatch":false,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Thu, Jul 13, 2006 at 02:51:20PM -0700, Junio C Hamano wrote:\n> \"J. Bruce Fields\" <bfields@fieldses.org> writes:\n> \n> >> As far as I recall \"git diff\" never defaulted to -M.\n> >\n> > Hm.  Is this related?:\n> >\n> > commit 42efbf6d8a5b4902c55a2f6e96034625c056ba1f\n> > Author: Junio C Hamano <junkio@cox.net>\n> > Date:   Sat Mar 11 17:44:10 2006 -0800\n> >\n> >     git-diff: -p disables rename detection.\n> \n> Ah, sorry, it _did_ default to -M; it was in such an ancient\n> past and the shell wrapper wasn't initially done by me, so I\n> misremembered.\n\nPerfectly understandable; thanks for the help.--b.\n"}]}