git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Carlos Martín Nieto" <cmn@elego.de>,
	git@vger.kernel.org, "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>,
	"Brian Gernhardt" <benji@silverinsanity.com>
Subject: Re: [PATCH] Name make_*_path functions more accurately
Date: Fri, 18 Mar 2011 09:06:37 +0100	[thread overview]
Message-ID: <4D83128D.6020206@drmicha.warpmail.net> (raw)
In-Reply-To: <7vipvgyjnl.fsf@alter.siamese.dyndns.org>

Junio C Hamano venit, vidit, dixit 18.03.2011 08:25:
> Carlos Martín Nieto <cmn@elego.de> writes:
> 
>> Rename the make_*_path functions so it's clearer what they do, in
>> particlar make clear what the differnce between make_absolute_path and
>> make_nonrelative_path is by renaming them real_path and absolute_path
>> respectively. make_relative_path has an understandable name and is
>> renamed to relative_path to maintain the name convention.
> 
> The approach taken by this patch is a sound one, and I like it.  The
> change does not reuse any existing name for different purpose, which means
> there is little chance of this change interacting other topics that may be
> in flight that introduce new call sites to these renamed functions in a
> funny way.  A (semantic) mismerge or misapplication of the patch will be
> found by the compiler.
> 
> For example, the version of setup.c this patch is based on the version
> before 05f08e4 (Merge branch 'cb/setup', 2011-02-09) was merged, and the
> merge introduced a new call site to make_absolute_path().  A few callsites
> to make_nonrelative_path() in wrapper.c were introduced at 70ec868 (Merge
> branch 'ae/better-template-failure-report', 2011-02-09), and this patch
> does not touch them.
> 
> As the result, the patch cleanly applies textually, but the resulting code
> does not compile, and it is a good thing ;-).

...because the "diff --color-words" for this version of the patch makes
it clear you only have to rerun

sed -e 's/make_absolute_path/real_path/g'

etc. on the affected files to resolve this "merge-compile conflict".

Just pointing it out for those who wonder why I pestered Carlos to bring
the patch into this form, and why Junio started to like failed builds.
Also, I need to make-up for making Junio explain my recent RFD :)

Cheers,
Michael

      reply	other threads:[~2011-03-18  8:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 11:26 [PATCH] Name make_*_path functions more accurately Carlos Martín Nieto
2011-03-18  7:25 ` Junio C Hamano
2011-03-18  8:06   ` Michael J Gruber [this message]

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=4D83128D.6020206@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=benji@silverinsanity.com \
    --cc=cmn@elego.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@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).