Git development
 help / color / mirror / Atom feed
From: Ronnie Sahlberg <sahlberg@google.com>
To: git@vger.kernel.org
Subject: [PATCH] Remove redundant close_ref function
Date: Tue,  8 Apr 2014 14:17:09 -0700	[thread overview]
Message-ID: <1396991830-20938-1-git-send-email-sahlberg@google.com> (raw)


List,

This is a trivial patch that removes the function close_ref() from refs.c.
This function was only called from two codepaths and can be removed since both codepaths shortly afterwards
both call unlock_ref() which implicitely closes the file anyway.

By removing this function we simplify the api to refs slightly.
This also means that the lifetime of the filedescriptor becomes the same as the lifetime for the 'struct ref_lock' object.
The filedescriptor is opened at the same time ref_lock is allocated and the descriptor is closed when ref_lock is released.


regards
ronnie sahlberg

             reply	other threads:[~2014-04-08 21:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-08 21:17 Ronnie Sahlberg [this message]
2014-04-08 21:17 ` [PATCH] Remove the close_ref function Ronnie Sahlberg
2014-04-08 21:50   ` Junio C Hamano
2014-04-08 22:23     ` Ronnie Sahlberg
2014-04-08 21:32 ` [PATCH] Remove redundant " Junio C Hamano

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=1396991830-20938-1-git-send-email-sahlberg@google.com \
    --to=sahlberg@google.com \
    --cc=git@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox