All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Thiago Farina <tfransosi@gmail.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] help.c: Pull cmd_version out of this file.
Date: Wed, 01 Sep 2010 18:04:28 -0700	[thread overview]
Message-ID: <7v39tt552b.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: AANLkTinHJHzcoFFjv-TaQ+DYVyqn46fqA802m8Lq5anp@mail.gmail.com

Thiago Farina <tfransosi@gmail.com> writes:

>>risk causing broken builds?
> Hum, how such trivial change can cause that?

Imagine if we had this in help.c:

        int cmd_version(int argc, const char **argv, const char *prefix)
        {
                printf("git version %s\n", GIT_VERSION);
                return 0;
        }

which were compiled with this rule in Makefile:

	help.o: help.c GIT-VERSION-FILE

and then you moved the function to a new file without touching the
dependency.  Especially because the change is trivial (just moving a
function from here to there), you don't immediately notice the broken
dependency.

I just spent 15+ minutes explaining this to you (and another 10+ minutes
checking that the above is _not_ the actual case before giving the same
explanation to you last night).  Now is this still a trivial change that
costs nothing?

>>What did we gain through this exercise?  Did we fix any real problem?
> All patches should just fix real problems?

There is a "cost vs benefit" ratio you need to consider.

  reply	other threads:[~2010-09-02  1:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-29 20:44 [PATCH] help.c: Pull cmd_version out of this file Thiago Farina
2010-08-30  2:38 ` Jonathan Nieder
2010-08-30  2:40   ` Jonathan Nieder
2010-09-01  2:38     ` Thiago Farina
2010-09-01  3:04       ` Nguyen Thai Ngoc Duy
2010-09-01  3:11         ` Thiago Farina
2010-09-01  6:11       ` Junio C Hamano
2010-09-01  6:22         ` Thiago Farina
2010-09-02  1:04           ` Junio C Hamano [this message]
2010-09-02  1:16             ` Thiago Farina
2010-09-02  4:35           ` Jonathan Nieder
2010-09-02 16:31             ` Junio C Hamano
2010-10-27 15:12               ` Thiago Farina
2010-10-27 15:18                 ` Jonathan Nieder
2010-10-27 16:06                   ` Thiago Farina
2010-10-27 16:45                     ` Jonathan Nieder
2010-10-28  2:13                       ` Thiago Farina
2010-10-28  3:11                         ` Jonathan Nieder

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=7v39tt552b.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=tfransosi@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.