Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Remove redundant close_ref function

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:00:39

Ronnie Sahlberg [off-list ref] writes:
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
Thanks.  A few tips:

 - wrap your lines at around 72 columns.

 - "git format-patch --cover-letter" will give you a skeletal
   message with "Subject: [PATCH 0/n]" with list of individual
   patches and diffstat to show the overall damage, with two
   placeholders "*** SUBJECT HERE ***" and "*** BLURB HERE ***"
   for you to fill in the remainder.

 - For a short/single patch, you do not have to add a cover letter
   (it is not a crime to add one, though).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help