From: Junio C Hamano <gitster@pobox.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: git@vger.kernel.org, antoine.delaite@ensimag.grenoble-inp.fr,
louis--alexandre.stuber@ensimag.grenoble-inp.fr,
chriscool@tuxfamily.org, thomasxnguy@gmail.com,
valentinduperray@gmail.com
Subject: Re: [PATCH v11 06/10] bisect: don't mix option parsing and non-trivial code
Date: Tue, 30 Jun 2015 08:56:26 -0700 [thread overview]
Message-ID: <xmqqk2ul8a1h.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <vpq7fqla06v.fsf@anie.imag.fr> (Matthieu Moy's message of "Tue, 30 Jun 2015 13:46:16 +0200")
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Matthieu, are you allowing your editor to corrupt the number of
>> lines in the hunk on the @@ ... @@ hunk header? "diff" mode in
>> Emacs does that,
>
> Indeed. There's magic in Emac's diff-mode to keep the header up to date,
> but it seems totally buggy. I manually deleted a tab (no line added, no
> line removed) and it changed the number of lines in the header.
I'd hesitate to call it "totally buggy", but (without reading its
code, merely an observation of its behaviour from the outside) it
seems that this behaviour comes from the fact that its theory of
operation is fundamentally flawed.
If it trusted the the original @@ ... @@ hunk header line and then
adjusted the numbers as the user adds, deletes or modifies lines, we
wouldn't be seeing this problem. Instead, it seems to totally
ignore the original number of lines recorded on the hunk header, and
counts what it deems to be part of the patch.
The thing is, when people edit a patch, they do not start from
scratch. They somehow prepare a patch with a tool, and its output
is far more likely than not to record the correct number of lines on
the hunk header. Not reading and trusting these numbers to see
where the original patch before it lets the user edit it, and
incorrectly including text outside the original patch in its own
count, is simply being silly.
Often, the last hunk of format-patch output has the "-- " signature
marker, which looks to Emacs as if the patch wants to delete a line
that has a dash and a space on it at the end.
> I see that you still managed to apply the series in pu, thanks and sorry
> for the inconvenience.
It's just the matter of realizing how it was corrupt and then
recounting the number of lines---a minor annoyance, not a big deal.
Thanks.
next prev parent reply other threads:[~2015-06-30 15:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 15:40 [PATCH v11 00/10] bisect terms Matthieu Moy
2015-06-29 15:40 ` [PATCH v11 01/10] bisect: correction of typo Matthieu Moy
2015-06-29 15:40 ` [PATCH v11 02/10] Documentation/bisect: move getting help section to the end Matthieu Moy
2015-06-29 15:40 ` [PATCH v11 03/10] Documentation/bisect: revise overall content Matthieu Moy
2015-06-29 15:40 ` [PATCH v11 04/10] bisect: replace hardcoded "bad|good" by variables Matthieu Moy
2015-06-29 15:40 ` [PATCH v11 05/10] bisect: simplify the addition of new bisect terms Matthieu Moy
2015-06-29 15:40 ` [PATCH v11 06/10] bisect: don't mix option parsing and non-trivial code Matthieu Moy
2015-06-29 20:28 ` Junio C Hamano
2015-06-30 11:46 ` Matthieu Moy
2015-06-30 15:56 ` Junio C Hamano [this message]
2015-06-29 15:40 ` [PATCH v11 07/10] bisect: sanity check on terms Matthieu Moy
2015-06-29 15:40 ` [PATCH v11 08/10] bisect: add the terms old/new Matthieu Moy
2015-06-29 15:40 ` [PATCH v11 09/10] bisect: add 'git bisect terms' to view the current terms Matthieu Moy
2015-06-29 15:40 ` [PATCH v11 10/10] bisect: allow setting any user-specified in 'git bisect start' Matthieu Moy
2015-06-29 16:44 ` [PATCH v11 00/10] bisect terms 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqk2ul8a1h.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=antoine.delaite@ensimag.grenoble-inp.fr \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=louis--alexandre.stuber@ensimag.grenoble-inp.fr \
--cc=thomasxnguy@gmail.com \
--cc=valentinduperray@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.