git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/3] Name make_*_path functions more accurately

From
Carlos Martín Nieto <cmn@elego.de>
Date
Mar 16, 2011, 16:42 UTC
Message-ID
<1300293751.7214.52.camel@bee.lab.cmartin.tk>
In-Reply-To
<D7B7C57A-B4DB-4CDC-B079-77537D8E8EFD@silverinsanity.com>
On mié, 2011-03-16 at 12:29 -0400, Brian Gernhardt wrote:
Show 14 quoted lines
> 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.
Show 6 quoted lines
> 
> 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
Previous: Brian GernhardtNext: Carlos Martín Nieto
Message 6 of 10 in “Rename make_*_path with clearer names”
  1. 0/3 Rename make_*_path with clearer namesCarlos Martín Nieto, Mar 16, 2011
  2. 1/3 make_absolute_path: return the input path if it points to our bufferCarlos Martín Nieto, Mar 16, 2011
  3. Junio C HamanoMar 16, 2011
  4. 2/3 Name make_*_path functions more accuratelyCarlos Martín Nieto, Mar 16, 2011
  5. Brian GernhardtMar 16, 2011
  6. Carlos Martín NietoMar 16, 2011
  7. 3/3 Use the new {real,absolute}_path function namesCarlos Martín Nieto, Mar 16, 2011
  8. Erik Faye-LundMar 16, 2011
  9. Carlos Martín NietoMar 16, 2011
  10. 3/3 Name make_*_path functions more accuratelyCarlos Martín Nieto, Mar 16, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.