All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Josh Triplett <josh@freedesktop.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Jim Meyering <jim@meyering.net>, Geert Bosch <bosch@adacore.com>,
	Alex Riesen <raa.lkml@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] git-log: detect dup and fdopen failure
Date: Thu, 28 Jun 2007 01:02:25 -0400	[thread overview]
Message-ID: <20070628050225.GI32223@spearce.org> (raw)
In-Reply-To: <4683211E.2010704@freedesktop.org>

Josh Triplett <josh@freedesktop.org> wrote:
> Linus Torvalds wrote:
> > That said, the whole "prepend 'x' to the function name" thing is obviously 
> > how git does things, but maybe it would be more readable in the long term 
> > to make the prefix be 'safe_' instead of 'x', or something like that?
> 
> If you want a more verbose name than xfoo, I personally like the foo_or_die
> convention, which reminds you explicitly that the function might kill the
> program.  safe_ might convey exactly the opposite impression.

I think the _gently suffix is already preferred for the
non-die()'ing variant of a function within Git.  For example see
setup_git_directory_gently() or lookup_commit_reference_gently().

Of course pkt-line.c goes and defines safe_read/safe_write.
And lets not forget about safe_create_dir() and
safe_create_leading_directories().

I guess we're about half-way in both directions.  Next function
declared with safe_ prefix or _gently suffix will tip the scale in
one direction or the other.  ;-)

-- 
Shawn.

      reply	other threads:[~2007-06-28  5:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-27 11:59 [PATCH] detect dup failure Jim Meyering
2007-06-27 12:48 ` Alex Riesen
2007-06-27 13:02   ` [PATCH] git-log: detect dup and fdopen failure Jim Meyering
2007-06-27 13:18     ` Alex Riesen
2007-06-27 13:32       ` Jim Meyering
2007-06-27 14:04         ` Alex Riesen
2007-06-27 14:14           ` Jim Meyering
2007-06-27 15:57             ` Alex Riesen
2007-06-27 16:34               ` Jim Meyering
2007-06-27 13:54     ` Geert Bosch
2007-06-27 14:06       ` Jim Meyering
2007-06-27 14:28       ` Jim Meyering
2007-06-27 16:49         ` Linus Torvalds
2007-06-28  2:46           ` Josh Triplett
2007-06-28  5:02             ` Shawn O. Pearce [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=20070628050225.GI32223@spearce.org \
    --to=spearce@spearce.org \
    --cc=bosch@adacore.com \
    --cc=git@vger.kernel.org \
    --cc=jim@meyering.net \
    --cc=josh@freedesktop.org \
    --cc=raa.lkml@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /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.