From: "Carlos Martín Nieto" <cmn@elego.de>
To: Brian Gernhardt <benji@silverinsanity.com>
Cc: git@vger.kernel.org, Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/3] Name make_*_path functions more accurately
Date: Wed, 16 Mar 2011 17:42:25 +0100 [thread overview]
Message-ID: <1300293751.7214.52.camel@bee.lab.cmartin.tk> (raw)
In-Reply-To: <D7B7C57A-B4DB-4CDC-B079-77537D8E8EFD@silverinsanity.com>
On mié, 2011-03-16 at 12:29 -0400, Brian Gernhardt wrote:
> On Mar 16, 2011, at 12:06 PM, Carlos Martín Nieto wrote:
>
> > 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.
> >
> > Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
>
> I didn't try it, but it looks like 2/3 horribly breaks the code and
> 3/3 fixes it. I personally (and I think others) prefer patches that
> are each useful on their own. Especially since a code-breaking patch
> like this makes bisecting harder.
True enough.
>
> I would suggest doing one of the following:
>
> 1) Squashing 2/3 and 3/3 so all the renaming occurs at once.
> 2) Adding wrappers from the old name to the new in 2/3 and removing
> them in 3/3.
I'll squash.
>
> That said, I'm not sure the renaming is useful although the
> documentation comments definitely are.
Do you think the difference between make_nonrelative_path and
make_absolute_path is clear without looking at the code? For me at
least, a relative path is the opposite of an absolute one, and a
non-relative path is the opposite of a relative one. To make a
difference between absolute and non-relative is then bound to lead to
errors.
cmn
next prev parent reply other threads:[~2011-03-16 16:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-16 16:06 [PATCH 0/3] Rename make_*_path with clearer names Carlos Martín Nieto
2011-03-16 16:06 ` [PATCH 1/3] make_absolute_path: return the input path if it points to our buffer Carlos Martín Nieto
2011-03-16 20:51 ` Junio C Hamano
2011-03-16 16:06 ` [PATCH 2/3] Name make_*_path functions more accurately Carlos Martín Nieto
2011-03-16 16:29 ` Brian Gernhardt
2011-03-16 16:42 ` Carlos Martín Nieto [this message]
2011-03-16 16:06 ` [PATCH 3/3] Use the new {real,absolute}_path function names Carlos Martín Nieto
2011-03-16 16:24 ` Erik Faye-Lund
2011-03-16 16:37 ` Carlos Martín Nieto
2011-03-16 16:52 ` [PATCH 2-3/3] Name make_*_path functions more accurately Carlos Martín Nieto
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=1300293751.7214.52.camel@bee.lab.cmartin.tk \
--to=cmn@elego.de \
--cc=benji@silverinsanity.com \
--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).