From: Jonathan Nieder <jrnieder@gmail.com>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] Improve the "diff --git" format documentation
Date: Thu, 14 Oct 2010 11:16:36 -0500 [thread overview]
Message-ID: <20101014161636.GB16500@burratino> (raw)
In-Reply-To: <201010141439.43168.agruen@suse.de>
Andreas Gruenbacher wrote:
> I still believe that the documentation should make it very clear how it
> handles created and deleted files;
Yes - thanks for doing this.
> --- a/Documentation/diff-generate-patch.txt
> +++ b/Documentation/diff-generate-patch.txt
> @@ -53,12 +53,22 @@ The index line includes the SHA-1 checksum before and after the change.
> The <mode> is included if the file mode does not change; otherwise,
> separate lines indicate the old and the new mode.
>
> -3. TAB, LF, double quote and backslash characters in pathnames
> +3. It is followed by a 'unified' diff which starts with a two-line
So afterwards the section would say:
What the -p option produces is slightly different from the traditional
diff format.
1. It is preceded with a "git diff" header, that looks like
this:
diff --git a/file1 b/file2
[...]
2. It is followed by one or more extended header lines:
old mode <mode>
new mode <mode>
[...]
3. It is followed by a 'unified' diff which starts with a two-line
[...]
At some point, the reader starts to wonder what "it" is. :) (2)
already has this problem, since the extended header lines actually
precede the traditional diff rather than following it.
How about:
What the -p option produces is slightly different[...]
1. It is preceded with a "git diff" header[...]
2. Next comes one or more extended header lines[...]
3. The from-file/to-file header that follows uses filenames
of the form a/file1 and b/file2 (where "a/" and "b/" can be
replaced with some other string or removed depending on
options used):
--- a/file1
+++ b/file2
This header is omitted if[...]
4. TAB, LF, double quote, and [...]
Jonathan
next prev parent reply other threads:[~2010-10-14 16:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 16:23 [PATCH] Improve the "diff --git" format documentation Andreas Gruenbacher
2010-10-06 17:22 ` Junio C Hamano
2010-10-06 23:03 ` Andreas Gruenbacher
2010-10-11 13:14 ` Andreas Gruenbacher
2010-10-14 1:55 ` Junio C Hamano
2010-10-14 1:55 ` Junio C Hamano
2010-10-14 10:53 ` Andreas Gruenbacher
2010-10-14 12:39 ` Andreas Gruenbacher
2010-10-14 16:16 ` Jonathan Nieder [this message]
2010-10-17 4:43 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101014161636.GB16500@burratino \
--to=jrnieder@gmail.com \
--cc=agruen@suse.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).