git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: git@vger.kernel.org
Subject: Re: when is "git diff" output suitable for patch?
Date: Thu, 13 Jul 2006 14:27:33 -0700	[thread overview]
Message-ID: <7vhd1lurei.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20060713212127.GA30770@fieldses.org> (J. Bruce Fields's message of "Thu, 13 Jul 2006 17:21:27 -0400")

"J. Bruce Fields" <bfields@fieldses.org> writes:

> I assume the -C and -M, -c, and -cc options all result in diff output
> that can't be correctly applied by "patch" any more?  (Would a patch to
> the git-diff-files documentation warning about this be helpful?)

May not be bad to have, except that I do not know if
"git-diff-files" documentation is the right place to talk about
it.

> Someone I'm working with is having trouble applying patches that they
> created with a simple "git diff".  The patches in question have some
> "copy from/copy to" headers.  Should that every happen with just a plain
> "git diff"?  Is this a bug in their version of git?  (They're on 1.2.4).

As far as I recall "git diff" never defaulted to -M.  These days
you can have diff.renames = true in the configuration to make it
so, but and I do not think there was any way to do that back in
1.2.4.

If _they_ created the diff with git, and if that is the same
_they_ who are having trouble applying, maybe you can suggest to
use "git apply" instead of "patch -p1"?

  reply	other threads:[~2006-07-13 21:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-13 21:21 when is "git diff" output suitable for patch? J. Bruce Fields
2006-07-13 21:27 ` Junio C Hamano [this message]
2006-07-13 21:31   ` J. Bruce Fields
2006-07-13 21:51     ` Junio C Hamano
2006-07-13 21:53       ` J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vhd1lurei.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=bfields@fieldses.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).