git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Sergei Organov <osv@javad.com>
Cc: "Ask Bjørn Hansen" <ask@develooper.com>, git@vger.kernel.org
Subject: Re: [PATCH] Don't add To: recipients to the Cc: header
Date: Fri, 23 Nov 2007 15:54:56 -0800	[thread overview]
Message-ID: <7vejegsejz.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <87hcjcra10.fsf@osv.gnss.ru> (Sergei Organov's message of "Fri, 23 Nov 2007 23:18:03 +0300")

Sergei Organov <osv@javad.com> writes:

> Yeah, it's one valid interpretation. Here is another one:
> ...
> taken from here: <http://www.answers.com/topic/diff?cat=technology>

Rants about how dangerous GNU patch liberally (mis)interprets a
broken patch and git-apply is written deliberately more strict
have been repeated on this list, and I would not steal it from
Linus in this response.

>> The diff editing mode of Emacs, at least the version that caused
>> this issue, however did not make use of that information.
>
> IMHO it's rather useless to argue about it without strict definition of
> correct format of a patch (do you have one?)

Yes.  2004 POSIX does not talk about unified context, but Austin
group's SD5-XCU-ERN-103/120 has additions to define unified
context and renames the traditional '-c' output to "copied
context".  Obviously it defines what the numbers on the hunk
header lines mean quite precisely.  GNU folks even managed to
insert text that allows a completely empty line (not a line with
a single SP on it) to express a context line that is empty,
which means...

> However, it's easy to add
> an empty line for format-patch and very difficult, if not impossible,
> for Emacs to handle this without such a line.
>
> Therefore I repeat my question: are there any objections to add such an
> empty line by format-patch?

... there is a strong objection, if you are talking about adding
an empty line before "-- \n" that is in front of the GIT version
signature: such an empty line would not help at all.  A broken
implementation will just skip over such an empty line, counting
it as a line common to both preimage and postimage, and will
still miscount the e-mail signature separator "-- \n" as a line
removed from the preimage.

Having said that, the _ONLY_ reason I made format-patch end its
output with "-- \n" with GIT version was because I wanted to do
an informal census of the user community by observing mailing
list traffic of projects that use git.  The tool has since
matured, and census in such a form is not so important anymore.

If we wanted to have a workaround to this issue, we could simply
remove these last two lines, and that would a be much better one
than an extra blank line.  I do not have a strong objection to
such a change, but you would need to adjust the tests.  The most
depressing part of the whole exercise would be to make sure that
the adjustments to the tests are correct.

  reply	other threads:[~2007-11-23 23:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19 11:00 [PATCH] Don't add To: recipients to the Cc: header Ask Bjørn Hansen
2007-11-19 11:05 ` Ask Bjørn Hansen
2007-11-20  7:52 ` Junio C Hamano
2007-11-20  9:36   ` Ask Bjørn Hansen
2007-11-20 19:04     ` Junio C Hamano
2007-11-20 19:18       ` Sergei Organov
2007-11-20 20:21         ` Junio C Hamano
2007-11-23 17:53           ` Sergei Organov
2007-11-23 19:48             ` Junio C Hamano
2007-11-23 20:18               ` Sergei Organov
2007-11-23 23:54                 ` Junio C Hamano [this message]
2007-11-26 13:48                   ` Sergei Organov
2007-11-26 16:53                     ` Junio C Hamano
2007-11-26 18:29                       ` Sergei Organov

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=7vejegsejz.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=ask@develooper.com \
    --cc=git@vger.kernel.org \
    --cc=osv@javad.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.
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).