git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jacob Keller <jacob.keller@gmail.com>,
	git@vger.kernel.org, Josh Bleecher Snyder <josharian@gmail.com>
Subject: Re: [RFC/PATCH] log: add log.firstparent option
Date: Fri, 24 Jul 2015 11:13:22 -0700	[thread overview]
Message-ID: <20150724181322.GB17730@peff.net> (raw)
In-Reply-To: <xmqqd1zhoave.fsf@gitster.dls.corp.google.com>

On Fri, Jul 24, 2015 at 08:04:21AM -0700, Junio C Hamano wrote:

> > I think a really simple example is something like:
> >
> >   1. somebody implements as feature. It needs to handle cases a, b, and
> >      c, but it only handles case a. Therefore it is buggy.
> >
> >   2. During review, somebody notices case b, and a new commit is made to
> >      fix it. Nobody notices case c.
> >
> >   3. The topic is merged.
> >
> >   4. Much later, somebody notices the system is buggy and hunts in the
> >      history.
> [...]
> 
> I actually do not think the above is quite true.  In our kind of
> "clean history, we do not squash 1 & 2.  See Paul's "rewrite am in
> C" series, for example, that starts from a "buggy" (in the sense
> that it does almost nothing in the beginning and then gradually
> builds on).
> 
> Instead, even somebody did not have foresight to realize 'b' when
> she adds code to handle 'a', we would make sure the solution for 'a'
> is sufficiently clearly described in commit #1.

Sometimes. There's definitely human wisdom going into the decision to
squash or make a new commit, which is a good thing. Here's a
counter-example to the am series. When I wrote the object-freshening
code, I accidentally inverted the test for checking whether packs were
fresh. This was noticed in review, and I corrected it by inverting the
is_fresh function. But in doing so, I introduced a new bug, where the
test for loose objects was inverted.

The original fix was squashed in the re-roll, but much later we noticed
and diagnosed that new bug. It was very valuable to me to read the
mailing list archive to see what happened, because the fact that there
_was_ a bug fix was lost in the clean history.

-Peff

  reply	other threads:[~2015-07-24 18:13 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23  1:23 [RFC/PATCH] log: add log.firstparent option Jeff King
2015-07-23  4:40 ` Config variables and scripting // was " David Aguilar
2015-07-23  5:14   ` Jeff King
2015-07-23  5:48     ` Jeff King
2015-07-23  6:32       ` Jacob Keller
2015-07-23  6:53         ` Jeff King
2015-07-23  6:55           ` Jacob Keller
2015-07-23  9:53             ` Michael J Gruber
2015-07-23 17:35               ` Jeff King
2015-07-23 17:37     ` Junio C Hamano
2015-07-23 22:14 ` Stefan Beller
2015-07-24  7:40   ` Jeff King
2015-07-24  7:46     ` Jacob Keller
2015-07-24  8:17       ` Jeff King
2015-07-24 15:31     ` Junio C Hamano
2015-07-25  1:36       ` Jeff King
2015-07-25  1:47         ` Jeff King
2015-07-25 17:18           ` Junio C Hamano
2015-07-27  4:43             ` Jeff King
2015-07-23 22:46 ` Junio C Hamano
2015-07-24  6:07   ` Jacob Keller
2015-07-24  7:34     ` Jeff King
2015-07-24  7:44       ` Jacob Keller
2015-07-24 15:04       ` Junio C Hamano
2015-07-24 18:13         ` Jeff King [this message]
2015-07-24  7:21   ` Jeff King
2015-07-24  7:23   ` Jeff King
2015-07-24 15:07     ` Junio C Hamano
2015-07-25  2:05       ` Jeff King
2015-07-25 17:41         ` Junio C Hamano
2015-07-25 22:41           ` Jacob Keller
2015-07-27  4:55           ` Jeff King

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=20150724181322.GB17730@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jacob.keller@gmail.com \
    --cc=josharian@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 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).